fix: prevent CI runs from cancelling each other on main#492
Open
fix: prevent CI runs from cancelling each other on main#492
Conversation
Change cancel-in-progress from unconditional `true` to
`${{ github.ref != 'refs/heads/main' }}` in codeql, build-and-test, and
lint workflows. This prevents back-to-back merges from cancelling each
other's runs on main while still cancelling superseded PR runs.
Also remove stale `feat/gateway-integration` branch from all workflow
triggers — the branch was merged and deleted.
Contributor
Coverage Report
|
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.
Summary
cancel-in-progressfrom unconditionaltrueto${{ github.ref != 'refs/heads/main' }}in codeql, build-and-test, and lint workflowsfeat/gateway-integrationbranch from all 6 workflow triggers (branch was merged and deleted)Root cause: When two PRs merge to main in quick succession, both trigger push events with the same concurrency group (
workflow-refs/heads/main). Withcancel-in-progress: true, the second run cancels the first — causing CodeQL (or build/lint) to show as cancelled/failed.The fix preserves cancellation for PR branches (where it's useful to skip superseded commits) while letting main branch runs complete independently.
Test plan