mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-17 21:54:30 +01:00
Stop gstack-pr-wait, the land gate and the release cut from calling a head green while a check on it failed (GST-2252) (#4257)
* Make gstack-pr-wait, gstack-ci-gate and the release cut count a failed check hidden behind an empty rerun (GST-2252) GitHub rollup and default check-runs list hold only each check suite latest attempt, so a rerun attempt with no jobs hid the failed run before it, and a workflow run that failed before any job never appeared. All three readers now add CI at the commit as the merge queue reads it (ciAtHead via lib/ci-head-checks.ts) and keep the worse bucket per check. Tests reuse the gstack-evals#303 recording from #4235. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Have the release cut read every check attempt only for commits that pass its named checks (GST-2252) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Say in the changelog that the release cut now counts failed commit statuses (GST-2252) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Let the release cut set its own jobs aside in the every-attempt check read too (GST-2252) After #4297 the cut sets aside check runs from its own workflow and the Windows nightly by job id, but the rows from lib/ci-head-checks.ts skipped that filter, so the cut waited on its own run. headCheckRows now takes the set-aside check run and workflow run ids and removes them from every list before ciAtHead reads it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
2af3822f94
commit
83cc10acd2
15 files changed
+307
-43
No files matched your search
+4
-1
@@ -44,7 +44,10 @@ regression fix (below).
|
||||
**Green** means, on that exact commit: the `free-tests` check run succeeded
|
||||
(the status main requires), the commit was gated (below), every check run on
|
||||
it has completed and none failed, and `refs/notes/gstack-trains` holds no
|
||||
active freeze. A cancelled check run counts as red. A commit with a check run
|
||||
active freeze. A cancelled check run counts as red. Check runs are read the
|
||||
way the merge queue reads them, so a failed check whose rerun attempt created
|
||||
no jobs, and a workflow run that failed before creating any job, count as red
|
||||
even though GitHub's default list hides them. A commit with a check run
|
||||
still going is skipped and the next older one is considered, back through 7
|
||||
days or 200 first-parent commits. The cut's own job lands a check run on
|
||||
main's head, the very commit it may cut, so check runs from this workflow's
|
||||
|
||||
+3
-1
@@ -277,7 +277,9 @@ no name or no readable `completed_at` counts on its own; commit-status contexts
|
||||
are counted one each. A workflow run that failed without starting any job
|
||||
counts as a failed check `<workflow> (run <id>, no jobs)` unless a later run of
|
||||
the same workflow replaced it; a run cancelled before any job is not counted.
|
||||
An unreadable list is unknown, never green.
|
||||
An unreadable list is unknown, never green. `gstack-pr-wait`, `gstack-ci-gate`
|
||||
and the release cut read CI through the same helper (`lib/ci-head-checks.ts`),
|
||||
on top of what they read before, so none of them calls such a head green.
|
||||
|
||||
When a check counts as passing only because a newer run from another check
|
||||
suite replaced a red one (a branch-only `free-tests.yml` dispatch beside the red
|
||||
|
||||
@@ -7308,7 +7308,12 @@ one stdout line per real event, prefixed `#<pr>`; progress and recoverable
|
||||
errors go to stderr. `/land-and-deploy` Step 3 runs it with `--until green`.
|
||||
Exit 0 means the `--until` condition is met or the PR merged; exit 1 and 2
|
||||
end with one of the two codes below. `green` gates on every check on the
|
||||
head, as `gstack-ci-gate` does, so the two never disagree; a check the base
|
||||
head, as `gstack-ci-gate` does, so the two never disagree. Both read every
|
||||
attempt of each check suite as `gstack-ship-queue ready` does: a failed check
|
||||
whose rerun attempt created no jobs (GitHub's default list then hides it) and a
|
||||
workflow run that failed before creating any job (`check failed: <workflow>
|
||||
(run <id>, no jobs)`) block `green`, and a rerun that passed clears its
|
||||
failure. A check the base
|
||||
branch requires (rulesets and classic branch protection) counts as pending
|
||||
until it appears. `--exclude <check,...>` leaves a named non-required check
|
||||
out of the verdict, as `gstack-ci-gate --exclude` does: it neither holds
|
||||
|
||||
Reference in new issue
Block a user