Stop post-merge CI on main cancelling itself #1076

Merged
jaylouisw merged 1 commit from ci/push-runs-not-cancelled into main 2026-11-08 15:24:46 +00:00
Owner

The concurrency group fell back to github.ref for anything that was not a pull request — and for every push to main, github.ref is the same string. So every merged PR joined one shared group, and the moment merges became quick they started cancelling each other.

Measured minutes after the runner's capacity went 1 → 2:

672 | push | 3 (cancelled) | 15:15:38 | 5 jobs
674 | push | 3 (cancelled) | 15:16:30 | 5 jobs
675 | push | 3 (cancelled) | 15:16:47 | 5 jobs
676 | push | 5 (waiting)   | 15:17:16 | 5 jobs

Four merges, four verification runs, three of them dead before starting. main was only ever verified when nothing else was happening — which on a busy queue is never. This is the same shape as the scheduled-workflow deadlock in #1071, and it is the other half of why "main is unverified on merge" kept being true even after #1072 made the matrix dispatchable.

github.sha keeps the original intent and removes the collision:

  • pull request → grouped by PR number: two runs of one PR are the same question, the newer still cancels the older.
  • push to main → grouped by commit: two runs are different commits, and a cancelled one is a commit nobody tested.

One line, no change to what any job does.

The concurrency group fell back to `github.ref` for anything that was not a pull request — and for every push to `main`, `github.ref` is the same string. So every merged PR joined one shared group, and the moment merges became quick they started cancelling each other. Measured minutes after the runner's capacity went 1 → 2: ``` 672 | push | 3 (cancelled) | 15:15:38 | 5 jobs 674 | push | 3 (cancelled) | 15:16:30 | 5 jobs 675 | push | 3 (cancelled) | 15:16:47 | 5 jobs 676 | push | 5 (waiting) | 15:17:16 | 5 jobs ``` Four merges, four verification runs, three of them dead before starting. `main` was only ever verified when nothing else was happening — which on a busy queue is never. This is the same shape as the scheduled-workflow deadlock in #1071, and it is the other half of why "main is unverified on merge" kept being true even after #1072 made the matrix dispatchable. `github.sha` keeps the original intent and removes the collision: - **pull request** → grouped by PR number: two runs of one PR are the same question, the newer still cancels the older. - **push to main** → grouped by commit: two runs are different commits, and a cancelled one is a commit nobody tested. One line, no change to what any job does.
Stop post-merge CI on main cancelling itself
Some checks failed
CI / Test (Node 18) (pull_request) Failing after 1m32s
CI / Test (Node 20) (pull_request) Failing after 1m32s
CI / Server smoke test (pull_request) Successful in 25s
CI / Docker build (pull_request) Successful in 9s
CI / Test (Node 22) (pull_request) Failing after 1m29s
d5126c807c
The concurrency group fell back to github.ref for anything that was not a pull
request - and for every push to main, github.ref is the same string. So each
merge joined one shared group, and as soon as merges became quick they began
cancelling each other.

Measured on 2026-11-08, minutes after the runner's capacity went from 1 to 2:
runs 672, 674 and 675 are three consecutive pushes to main, each with five jobs
created, all cancelled before starting. main was being verified only when nothing
else was happening - which, on a busy queue, is never.

github.sha keeps the intent and fixes the collision: two runs of one pull request
are the same question and the newer still cancels the older, while two runs on
main are different commits and neither may cancel the other.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-08 15:19:40 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1076
No description provided.