Skip to content

ci(codeql): don't cancel superseded runs of a required scan#484

Merged
hyperpolymath merged 2 commits into
mainfrom
ci/codeql-no-cancel-required-scan
Jul 11, 2026
Merged

ci(codeql): don't cancel superseded runs of a required scan#484
hyperpolymath merged 2 commits into
mainfrom
ci/codeql-no-cancel-required-scan

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

Canonical codeql.yml set concurrency.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.yml copies in this monorepo carry the same line and should be swept in a follow-up (mechanical truefalse).

Diagnosed while fixing recurring red/hung checks on metadatastician/gossamer #108.

🤖 Generated with Claude Code

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.
@hyperpolymath hyperpolymath merged commit 2ccc38e into main Jul 11, 2026
17 checks passed
@hyperpolymath hyperpolymath deleted the ci/codeql-no-cancel-required-scan branch July 11, 2026 11:41
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant