cicd
concurrency
ai_generated
true
Error: The run was canceled because a higher priority run was queued. Concurrency group: ci-main
ID: cicd/gha-concurrency-cancelled
85%Fix Rate
87%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
A GitHub Actions workflow run is cancelled because a newer commit to the same branch triggers another run in the same concurrency group. The cancel-in-progress setting supersedes the older run.
genericWorkarounds
-
90% success Use branch-aware concurrency groups with cancel-in-progress only for non-default branches
Set 'concurrency: group: ${{ github.workflow }}-${{ github.ref }}' with 'cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}' to only cancel in-progress runs on feature branches -
82% success Disable cancel-in-progress and let jobs queue instead
Set 'cancel-in-progress: false' in the concurrency block so that newer runs wait for the current run to complete instead of cancelling it
Dead Ends
Common approaches that don't work:
-
Remove the concurrency configuration entirely
60% fail
Without concurrency controls, multiple runs pile up consuming runner resources and potentially deploying out of order
-
Set a unique concurrency group per run using run_id
85% fail
Using a unique key per run effectively disables concurrency control, defeating its purpose entirely
Error Chain
Leads to:
Preceded by:
Frequently confused with: