ci: cancel in-progress shard runs on PR events to stop CI queue pile-up#1792
Conversation
cancel-in-progress was false for pull_request events, so every synchronize (and every master push) stacked another full 49-shard matrix in the queue instead of superseding the prior run. Against the free-tier 20-concurrent-job cap this saturated the pool for hours — fresh runs sat pending with 0 jobs dispatched (observed on PR #1789). Set cancel-in-progress to true for all events so the latest commit's run supersedes the stale one and frees runners immediately. The head run always completes (nothing newer supersedes it); only superseded SHAs are cancelled, which is the correct signal. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
sonarcloud.yml(the 49-shard test matrix) setcancel-in-progress: falseforpull_requestevents. Everysynchronize(and every master push) therefore stacked another full matrix in the queue instead of superseding the prior run. Against the GitHub free-tier 20-concurrent-job cap this saturated the pool for hours — fresh runs satpendingwith 0 jobs dispatched, so PRs showed no shard checks running at all (observed live on PR #1789 and other open PRs).Fix
Set
cancel-in-progress: truefor all events. The latest commit on a branch/PR is the only one whose green signal matters; superseding the stale in-flight run frees runners immediately so the current tip actually gets scheduled.Trade-off (accepted): a mid-matrix cancel marks the superseded SHA's in-flight shards cancelled (which GitHub reports as failing) — but that is not the head. The freshly-triggered run for the new tip is the authoritative signal branch-protection / mergeability consume, and it runs to completion because nothing newer supersedes it.
Why this needs to land on master
For
pull_requestruns GitHub evaluates the workflow (and itsconcurrency) from the PR's merge commit (head ∪ base). Once master carries this fix, every other open PR picks it up on its next run/synchronize — unblocking the shard runs across all PRs, not just the one this was found on.Single-file workflow change; no code impact.
🤖 Generated with Claude Code