ci(codeql): don't cancel superseded runs of a required scan#484
Merged
Conversation
CodeQL is a REQUIRED code-scanning tool in the estate branch rulesets — a result must upload for the head commit before merge. With cancel-in-progress: true a re-push cancels the in-flight scan, which uploads nothing, leaving branch protection stuck "expecting 1 result from CodeQL for <sha>" forever (the ghost check that blocks estate PRs for hours/days). Queue instead of cancel so the latest commit always completes + uploads. This is the canonical template; consumer repos inherit it on next sync.
|
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.



What
Canonical
codeql.ymlsetconcurrency.cancel-in-progress: true. For a required code-scanning tool that is the root cause of PRs hanging for hours/days on "Code scanning is still expecting 1 result from CodeQL for<sha>": a re-push cancels the in-flight scan, which uploads nothing, so branch protection waits forever for a result that never arrives.Change
cancel-in-progress: false— queue superseded runs instead of cancelling, so the latest commit's CodeQL scan always completes and uploads. Comment updated to explain why cancellation is unsafe for a required scan.Scope / propagation
This is the canonical root template; consumer repos pick it up on their next standards sync. The many nested
*/codeql.ymlcopies in this monorepo carry the same line and should be swept in a follow-up (mechanicaltrue→false).Diagnosed while fixing recurring red/hung checks on metadatastician/gossamer #108.
🤖 Generated with Claude Code