Skip to content

fix: prevent CI runs from cancelling each other on main#492

Open
tejaskash wants to merge 1 commit intomainfrom
fix/ci-concurrency-cancel
Open

fix: prevent CI runs from cancelling each other on main#492
tejaskash wants to merge 1 commit intomainfrom
fix/ci-concurrency-cancel

Conversation

@tejaskash
Copy link
Contributor

Summary

  • Change cancel-in-progress from unconditional true to ${{ github.ref != 'refs/heads/main' }} in codeql, build-and-test, and lint workflows
  • Remove stale feat/gateway-integration branch 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). With cancel-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

  • Pre-commit hooks pass (prettier, secretlint, typecheck)
  • Merge two PRs back-to-back and verify both CI runs complete on main

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.
@tejaskash tejaskash requested a review from a team March 3, 2026 22:32
@github-actions github-actions bot added the size/s PR size: S label Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 46.37% 3428 / 7392
🔵 Statements 46% 3612 / 7851
🔵 Functions 48.17% 685 / 1422
🔵 Branches 50.55% 2258 / 4466
Generated in workflow #834 for commit 08ab83b by the Vitest Coverage Report Action

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

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant