Cancel superseded Test runs per branch - #460
Merged
Merged
Conversation
Sayan-
marked this pull request as ready for review
August 26, 2026 20:54
Test triggers on every push to every branch with nothing cancelling the runs a newer push obsoletes, so rapid iteration on a branch stack piles up full runs that hold self-hosted slots every repo on the shared pool queues behind. Group runs by ref with cancel-in-progress so only the newest run per branch survives; main and workflow_dispatch runs get a unique group per run and are never cancelled or coalesced. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sayan-
force-pushed
the
hypeship/test-concurrency-cancel
branch
from
August 26, 2026 20:57
ac89cd6 to
897e7b7
Compare
hiroTamada
approved these changes
Aug 27, 2026
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.
Test runs on every push to every branch, and superseded runs kept running: pushing a stack of branches repeatedly can put dozens of full runs in flight at once, with only the newest per branch mattering. Since the linux test job runs on the shared self-hosted pool, the stale runs starve every other repo's CI (kernel/kernel jobs were queuing 30+ minutes behind one such burst).
This adds workflow-level concurrency grouped by ref with cancel-in-progress, so a newer push cancels the older run for that branch. Two deliberate exclusions:
Note on rollout: push-event runs read the workflow file from the pushed commit, so this takes effect for a branch once it contains this change (i.e. after rebasing onto main). Runs already queued are unaffected.
🤖 Generated with Claude Code
Note
Low Risk
CI-only workflow change; no application code or runtime behavior is affected.
Overview
Adds workflow-level concurrency to the Test workflow so rapid pushes on feature branches do not pile up full Linux self-hosted runs that block the shared runner pool.
For push events on non-
mainrefs, runs share a concurrency group keyed bygithub.ref, withcancel-in-progress: true, so only the latest push per branch keeps testing.mainpushes andworkflow_dispatch(slash-command) runs usegithub.run_idas the group and are not cancelled—avoiding GitHub’s behavior where a new run in the same group can drop a pending run even when cancellation is disabled.Existing job-level concurrency on the macOS jobs is unchanged.
Reviewed by Cursor Bugbot for commit 897e7b7. Bugbot is set up for automated code reviews on this repo. Configure here.