You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: Superseded merge-queue runs are not cancelled when master moves #986
When master moves (a queue merge or a maintainer bypass), GitHub rebuilds every queued group, but the old merge_group runs keep waiting for runners. pr-pull.yaml's concurrency group is ${{ github.workflow }} @ … github.ref, and a queue ref includes the base commit (gh-readonly-queue/master/pr-970-<base sha>), so a PR's new queue run never cancels its old one.
On 2026-10-16 between 04:01 and 04:10 UTC this left 2–3 queue runs per PR waiting on the scarce ubuntu-26.04 runners. They were cancelled by hand twice (10, then 11 runs), keeping only the run whose head matches the live queue entry.
Fix options:
A first job in merge_group runs (actions: write) that cancels other in-flight merge_group runs for the same PR number whose head isn't a live queue entry.
A concurrency group keyed on the PR number for merge_group events, if it can be derived in an expression (the ref is …/pr-<N>-<sha>; expressions have no substring, so likely a small check-event output feeding the downstream jobs' concurrency:).
Acceptance: after master moves, each queued PR has exactly one live queue run within a minute, checked on a real queue.
One PR: ci/cancel_superseded.py (pure superseded(runs, current) + gh I/O, unit-tested in ci/), called by a first job in pr-pull.yaml on merge_group events with job-level actions: write. It cancels older in-flight queue runs for the same PR number.
Activity
zackees commentedon Oct 16, 2026
Claiming: #986
ci/cancel_superseded.py(puresuperseded(runs, current)+ gh I/O, unit-tested inci/), called by a first job inpr-pull.yamlonmerge_groupevents with job-levelactions: write. It cancels older in-flight queue runs for the same PR number.ci: Cancel superseded merge-queue runs (#988)