sunchao commented on code in PR #5963:
URL: https://github.com/apache/datafusion-comet/pull/5963#discussion_r4017791198
##########
.github/workflows/ci.yml:
##########
@@ -204,6 +225,21 @@ jobs:
# every output true for this event so a manual run can exercise
# any gated job.
:
+ elif [[ "$EVENT_NAME" == "schedule" ]]; then
+ # The nightly's base is the commit the last successful scheduled
+ # run tested, so everything that landed since is covered exactly
+ # once and a red nightly keeps its commits in scope until a green
+ # one supersedes it. Without such a run (the first nightly, an API
+ # error, or a base no longer on main) fall back to the tip as of
+ # the previous tick, with 30 minutes of slack for scheduling
+ # jitter. A quiet day diffs to nothing and runs nothing; so does
+ # a docs-only day.
+ prev=$(python3 dev/ci/nightly-base.py)
+ if [[ -z "$prev" ]] || ! git merge-base --is-ancestor "$prev" HEAD
2>/dev/null; then
+ prev=$(git rev-list -1 --before="24 hours 30 minutes ago" HEAD)
Review Comment:
[P2] Preserve pending coverage when the nightly baseline is unknown
The successful API lookup now preserves coverage, but this fallback can
still lose it. Could we run the full nightly tier when no trustworthy baseline
is available, or fail change detection so the run cannot become a successful
baseline?
For example, the last green nightly was 72 hours ago, a source change landed
60 hours ago, that change has not passed a nightly, and only documentation
changed recently. If the Actions API returns HTTP 503, `nightly-base.py` warns
and exits 0 with no SHA. This fallback selects the 60-hour-old source commit as
`prev`, so the diff contains only documentation and all nightly jobs skip. The
run can finish green. Once the API recovers, that new green HEAD becomes the
baseline, so the pending source coverage has been permanently dropped unless
another relevant change triggers it.
I reproduced this with the actual helper against a local API server, these
workflow commands, and the current routing script. The normal API response
selected all six nightly outputs. HTTP 503 returned exit 0 and selected none
for the same Git history. This is the remaining error-path gap in the
[last-green-run
update](https://github.com/apache/datafusion-comet/pull/5963#discussion_r4017781339).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]