Repository navigation
ci: a PR's newer push cancels its older CI/CD run; closing a PR cancels its runs - #991
Merged
Merged
Conversation
…ls its runs CI/CD gave each pull_request run a concurrency group of its own, so every push's run ran to the end, and nothing cancelled a PR's runs once it merged. On 2026-11-03, 9 of 28 queued runs were for merged PRs or replaced commits. - ci.yml: PR runs share one group per PR number with cancel-in-progress, so a newer push cancels the older run, queued or running. Pushes keep their group as it was (a running master run finishes). - ci-cancel-closed.yml: on pull_request closed, join that PR's CI/CD group with cancel-in-progress (cancels its CI/CD run without waiting for a runner), then cancel the branch's other unfinished pull_request runs. The heavy jobs' "never cancel, it strands the cache" rule no longer holds: nothing has been cached since the deps moved to cvcpkg (b640d5e). The comments say so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stale CI runs pile up in the queue. On 2026-11-03, 9 of the 28 queued or running runs were for PRs that had already merged (#984, #980, #979), for PR commits a newer push had replaced (#985, #990, #982), or for an older master commit. They were cancelled by hand. This PR stops them building up.
Why they piled up
ci.ymlgave everypull_requestrun a concurrency group of its own (run-<run_id>), so a newer push never replaced or cancelled a PR's older run.CI (recipe-first)andllm-gatealready group per ref and cancel.What changes
ci.yml:ci-pr-<N>, withcancel-in-progress. A newer push cancels the PR's older CI/CD run, whether it's queued or running.ci-cancel-closed.yml(new, onpull_request: closed):ci-pr-<N>withcancel-in-progress, which cancels that PR's CI/CD run as soon as the closer run is created, without waiting for a runner.pull_requestruns (CI (recipe-first),llm-gate, ...). It needsactions: write, runs on a hostedubuntu-latestand checks nothing out.The trade-off: heavy jobs can now be cancelled mid-build
The old comments said a running package job must never be cancelled, because that would strand the VTK cache and force a 22-min cold rebuild. That no longer holds:
grep -rn 'actions/cache\|ccache\|sccache' .github/finds nothing.The job-level groups are unchanged, and the comments now say why no cache is at stake.
Not changed: no new
actions/cacheorupload-artifactsteps.Checks