Never cancel a Type label run - #1202
Merged
Merged
Conversation
A pull request gets several events within a second (opened, then one per label). The workflow cancelled the older runs in a newer run's group, and each cancelled run stayed beside the successful one as a cancelled Type label check, which kept the required check blocked until it was re-run by hand. The group now queues every run (queue: max, cancel-in-progress: false) so no run is cancelled; the job takes seconds. The workflow's test pins the group. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
Author
|
Independent review (local, Opus) of 161f86a Verdict: no P1/P2; 1 optional P3. Workflow and test only; no pinned path.
Optional P3: the body says "+8/-1 in the workflow (6 of them a comment)". |
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.
Part of #1183
Outcome and reason
Two armed pull requests (#1180 and #1186) sat BLOCKED with every required check green except
Type label. A pull request gets several events within a second (opened, then onelabeledper label), and the workflow's concurrency group cancelled the older runs. Each of #1180 and #1186 had three successful and three cancelledType labelruns on one commit. Over 194 merged pull requests, 25 merged with a cancelled run beside a successful one, so a cancelled run alone does not block; the data fits one rule: the result that counts is the newest run (highest run id). On #1180 the newest run was cancelled before it started a job, because the runs reached the group in a different order from their creation, and the pull request stayed blocked until the newest run was re-run (re-running older runs did nothing). The group now queues every run, so the burst runs in order and this group cancels none of it.Scope, reuse, and impact
.github/workflows/pr-labels.ymlconcurrency only:cancel-in-progress: falseandqueue: max(the same keystax-audit-mutations-nightly.yml:30-31uses at workflow level for the same reason, andci.yml:913at job level; on this repository, three back-to-back dispatches of the nightly workflow showed two runs pending together instead of the newer cancelling the older), plus an assertion of the group in the workflow's existing test. The merge-queue half of the workflow keys its group on the run id and is unchanged. Excluded: the label check itself and its script.queue: max(verified on this repository by the nightly workflow). What is deleted: thecancel-in-progressexpression. What breaks if this is not built: armed pull requests keep stalling silently, and each stall needs a hand re-run.Validation and evidence
node --test scripts/check-pr-type-label.test.mjs: 4 passed; with the previous workflow file restored the new assertion fails (3 passed, 1 failed).Type labelsettles later within a burst. Measured over 31 successful runs: median 32 s, p90 105 s, max 247 s each; the requiredRequired checkstakes about 20 minutes, which hides it.queue: maxholds up to 100 waiting runs.🤖 Generated with Claude Code