Skip to content

ci: cancel in-progress shard runs on PR events to stop CI queue pile-up#1792

Merged
ooples merged 1 commit into
masterfrom
ci/pr-shards-cancel-in-progress
Jul 6, 2026
Merged

ci: cancel in-progress shard runs on PR events to stop CI queue pile-up#1792
ooples merged 1 commit into
masterfrom
ci/pr-shards-cancel-in-progress

Conversation

@ooples

@ooples ooples commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Problem

sonarcloud.yml (the 49-shard test matrix) set cancel-in-progress: false for pull_request events. Every synchronize (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 sat pending with 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: true for 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_request runs GitHub evaluates the workflow (and its concurrency) 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

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>
Copilot AI review requested due to automatic review settings July 6, 2026 02:50
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aidotnet_website Ready Ready Preview, Comment Jul 6, 2026 2:50am
aidotnet-playground-api Ready Ready Preview, Comment Jul 6, 2026 2:50am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: de438d49-605d-4bd8-9988-d492eac7697d

📥 Commits

Reviewing files that changed from the base of the PR and between 3522f76 and 2e243f4.

📒 Files selected for processing (1)
  • .github/workflows/sonarcloud.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/pr-shards-cancel-in-progress

Comment @coderabbitai help to get the list of available commands.

@ooples ooples merged commit 866055f into master Jul 6, 2026
88 of 96 checks passed
@ooples ooples deleted the ci/pr-shards-cancel-in-progress branch July 6, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants