mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-24 00:51:31 +01:00
CI reuse: a neutral run no longer blocks a passing one, and workflow_call checks clear only at the exact commit (GST-3554) (#4713)
A newer CI run that concluded `neutral` no longer blocks reusing a passing run on the same commit, and a check that only runs inside another workflow (`workflow_call`) now clears only from a run that tested your exact commit. Why: gbrain kept hitting `newer_run_vetoes` on passing runs (#9827, #10058, #10021), and a calling workflow's green run from any commit could clear such a check. Nothing to do: gbrain's skipped-run case was already fixed on main by #4695; this adds `neutral`, the exact-commit rule and regression tests built from gbrain's real runs. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/outside-voice#1 reader=outside-voice
This commit is contained in:
1 parent
00a6b7a353
commit
d3aed00dbe
11 files changed
+422
-11
No files matched your search
+7
-3
@@ -929,8 +929,8 @@ once:
|
||||
attempt meanwhile is `run_changed`. A newer run of the same workflow on the
|
||||
head, of any event, vetoes it (`newer_run_vetoes`) when that run failed, was
|
||||
cancelled or is still running. A newer green run doesn't, and neither does a
|
||||
newer skipped run, which ran no job and so says nothing about the tree
|
||||
(GST-3514).
|
||||
newer skipped or neutral run, which ran no job that could fail and so says
|
||||
nothing about the tree (GST-3514, GST-3554).
|
||||
- Every job the profile names appears exactly once in that attempt and
|
||||
succeeded. Jobs and runs are read across every page.
|
||||
- `tree.json` (an artifact of at most 8 MiB) names this run, attempt, event and
|
||||
@@ -1055,7 +1055,11 @@ of a caller: a workflow in the branch's own `.github/workflows/` with a job
|
||||
that says `uses: ./.github/workflows/<lane's>.yml` (GST-971), read at
|
||||
pregate.json's recorded tree, as long as the lane's own job succeeded in the
|
||||
run under that calling job (`<calling job> / <lane job>`); else it refuses
|
||||
with `caller_job_skipped`. Fix lines only suggest `gh workflow run` for
|
||||
with `caller_job_skipped`. A caller run counts only when it tested
|
||||
pregate.json's own head and tree (GST-3554): a run of another commit refuses
|
||||
with `head_mismatch`, a `pull_request` run (which tested GitHub's merge of the
|
||||
head with its base) with `merge_tested`, and a head whose tree is not
|
||||
pregate.json's tree with `tree_mismatch`. Fix lines only suggest `gh workflow run` for
|
||||
a file with a `workflow_dispatch` trigger.
|
||||
The run must also
|
||||
have finished green (GSTA-203 PR 8): a run that is still queued or running
|
||||
|
||||
@@ -5053,7 +5053,10 @@ line; after the last three, clear again with a finished green run of the
|
||||
lane's own workflow ([run evidence](pregate.md#run-evidence)). For a lane whose
|
||||
workflow runs only through `workflow_call`, a run of a workflow whose job says
|
||||
`uses: ./.github/workflows/<lane's>.yml` counts as a run of the lane (GST-971);
|
||||
it refuses `caller_job_skipped` when its `<calling job> / <lane job>` job did not succeed.
|
||||
it refuses `caller_job_skipped` when its `<calling job> / <lane job>` job did not succeed,
|
||||
`head_mismatch` when the caller run ran at a commit other than pregate.json's head,
|
||||
`merge_tested` when it is a `pull_request` run, and `tree_mismatch` when the head's tree
|
||||
is not pregate.json's tree (GST-3554): dispatch the caller at the head and clear with that run.
|
||||
|
||||
Another tree is accepted in exactly one case: it differs from `pregate.json`'s
|
||||
tree only in the repo's stamp rule (`.gstack/ship-policy.json` on the base
|
||||
|
||||
Reference in new issue
Block a user