mediumFoundationSymptom-first#concurrency#cancellation#parallel#deployment

New run cancels previous - concurrency group overlap

Previously in-progress workflow shows 'Cancelled' when a new push arrives

Likely source:deploymentconfiguration

Focused incident mode — strips away everything but this runbook.

Symptoms

  • Previously in-progress workflow shows 'Cancelled' when a new push arrives
  • Deployment of the older commit is aborted in favor of the new one
  • Concurrent runs on the same branch keep cancelling each other

Evidence to grab

Collect these artifacts before you change anything — they prove (or rule out) each cause.

  • Concurrency block in the workflow

    cat .github/workflows/<file>.yml | grep -A5 'concurrency'
  • Run cancellation history

    gh run list --repo <OWNER/REPO> --status cancelled --limit 5

Diagnostic flow

Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.

Guided decision tree is ready.

Steps with commands, expected output, and pass/fail branches.

Ranked root causes

Evidence checklist

  • A test/lint workflow has cancel-in-progress: true
  • Multiple PRs cancelling each other's test runs

Confirm before fixing

cat .github/workflows/<file>.yml | grep -A5 'concurrency'
READ

Confirm cancel-in-progress setting

Fix

sed -i 's/cancel-in-progress: true/cancel-in-progress: false/' .github/workflows/<file>.yml
CHANGE

Disable cancel-in-progress for non-deploy workflows

Resolution runbook

Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.

1
cat .github/workflows/<file>.yml | grep -A5 'concurrency'
READ

Read the concurrency configuration

2
gh run list --repo <OWNER/REPO> --status cancelled --limit 5
READ

Confirm which runs were cancelled

3
sed -i 's/cancel-in-progress: true/cancel-in-progress: false/' .github/workflows/<file>.yml
CHANGE

Disable cancellation if needed

Prevention

  • Only use cancel-in-progress: true for deploy workflows, not for tests or lints.
  • Include github.ref in the concurrency group name to scope cancellation to the branch.
  • Document which workflows use cancellation and why.

Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.