Repository navigation
ci: cancel superseded runs for the same PR or branch - #2397
Merged
Merged
Conversation
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.
Why
None of the four pull-request workflows declares
concurrency. Every fix-up push therefore starts a new full matrix while the previous one keeps running to completion, even though its result can no longer affect the PR.That is measurable on the current queue: 47
pull_requestworkflow runs in the six hours before this PR (2 Nov, 15:00–21:55 UTC), andTestsalone fans out to lint, web, desktop on two OSes, import checks on six combinations, Python tests on four versions, the TypeScript chat engine, and video isolation. With 193 open PRs and authors often pushing several times per hour, most of that runner time is already stale when it finishes.The effect is not only cost: a superseded run still occupies the queue, so the latest commit waits behind a run nobody needs.
What changes
Add the standard concurrency group to the four workflows that run on
pull_request:github.event.pull_request.numbergroups all runs of one PR;github.refcoverspush,scheduleandworkflow_dispatch.github.workflowis part of the group soTests,Modular installation,Repository HygieneandMemory snapshot evaluationnever cancel each other.Workflows without a PR trigger (release, notarization, PyPI, Docker) are untouched.
Verification
The setting was exercised on this PR itself. After the second push (
db309527), GitHub cancelled the still-runningTestsworkflow from the first commit (a7703bd3) while the other three, already complete, kept their results:All four files parse with PyYAML and expose the expected
concurrency.group;git diff --checkis clean. The change affects only CI scheduling, not application code.Refs #2354 (CI queue work), though this is independent of the Windows lane.