ci: don't cancel in-progress main push runs (fix startup_failure on rapid merges) - #1006
Conversation
cancel-in-progress: true on group ci-${{ github.ref }} means back-to-back merges to main
share one concurrency group and cancel each other during startup, producing startup_failure
runs (e.g. merging two Renovate PRs ~5s apart left main's CI red despite valid workflows).
Scope cancellation to pull_request events so every main merge gets a complete CI run while PR
pushes still cancel superseded runs.
|
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 🛠️ Maintainer review — Held for maintainer reviewReviewed 1 changed file(s) — two independent AI reviewers, synthesized. ✅ Safe to merge — both reviewers found no blocking issues.
Merge readiness: ✅ Mergeable · all CI checks green/neutral/skipped. Summary The change correctly scopes the concurrency cancel‑in‑progress flag to PR runs only, preventing cancellation of back‑to‑back main pushes and fixing the reported startup_failure issue. No security concerns, code correctness, or test regressions are introduced. The workflow syntax is valid and the added comments improve maintainability. 💡 Nits — non-blocking, optional
|
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
ghost
left a comment
There was a problem hiding this comment.
Held for maintainer (guardrail_area) — correct + CI green
The expression form (cancel-in-progress: ${{ github.event_name == 'pull_request' }}) from #1006
caused GitHub to fail ci.yml at startup (startup_failure) on both push and pull_request, so the
required `validate` check never reported and PRs sat stuck 'waiting'. actionlint accepts the
expression but GitHub's runtime parser does not start the run. Revert to the known-good literal.
Problem
Merging two PRs within seconds left main's CI showing
startup_failureon both push runs. Root cause:ci.ymlusesFor
pushto main,github.refisrefs/heads/main, so back-to-back merges land in the same group andcancel-in-progressraces them during startup → both end asstartup_failure(GitHub can't cleanly cancel a run that's still starting). The workflows are valid — the PRs'pull_requestruns passed identically.Fix
Scope cancellation to PR events only:
PR pushes still cancel superseded runs (fast feedback), but every merge to main now gets a complete CI run. Merging this also produces the clean green push run main is currently missing.