Repository navigation
fix(ci): restore per-commit CI runs on main - #1536
Conversation
PR #1530 changed the concurrency block in pr-test-rust.yml and pr-test-mlx.yml so that `cancel-in-progress` is unconditionally true, including for push events on main. Because all main pushes share one concurrency group (`gateway-tests-main` / `mlx-tests-main`), a new commit landing on main now cancels the in-progress CI run for the previous commit, breaking the project's invariant that every commit on main runs CI to completion (so a failure can be bisected to a specific commit). Re-introduce the `event_name == 'pull_request'` guard on `cancel-in-progress` while keeping the new PR-number-keyed group. Net effect: PR runs still cancel on push (the intent of #1530), main push runs do not cancel each other (the prior behavior). Signed-off-by: Chang Su <8605658+CatherineSue@users.noreply.github.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR updates two GitHub Actions test workflows to conditionally cancel in-progress runs only for pull request events. The ChangesWorkflow concurrency settings
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Description
Problem
#1530 rewrote the
concurrencyblock inpr-test-rust.ymlandpr-test-mlx.ymland, alongside the new PR-number-based group key, dropped theevent_name == 'pull_request'guard oncancel-in-progress, making it unconditionallytrue.For push-to-
main, the group key resolves togateway-tests-main/mlx-tests-main— every commit onmainshares one group. Withcancel-in-progress: true, when commit B lands while commit A's CI is still running, B joins A's group and kills A's run mid-flight.This breaks smg's invariant that every commit on
mainruns CI to completion. Without per-commit CI, agit bisectagainst a regression onmaincan land on a commit whose CI was cancelled and therefore has no signal.The PR-number-based group key for PR events and the new
cancel-merged-pr-tests.ymlworkflow added by #1530 are unaffected by this fix — they only target PR runs.Solution
Restore the
event_name == 'pull_request'guard oncancel-in-progress, keeping the PR-number-based group key from #1530:Net behavior after this PR:
workflow_dispatchonmain— shares the main push group; neither cancels the other.Changes
.github/workflows/pr-test-rust.yml— changecancel-in-progress: trueback tocancel-in-progress: ${{ github.event_name == 'pull_request' }}..github/workflows/pr-test-mlx.yml— same change.Test Plan
Local checks:
Both pass; YAML parses, no whitespace issues.
No Rust or Python sources are touched in this PR, so
cargo fmt/cargo clippyare not applicable.Behavioral verification once merged (observable on
main):mainwhile the prior commit'sPR Test (SMG)is in progress; the prior run should continue to completion (after this PR) instead of being cancelled (before this PR).Checklist
cargo +nightly fmtpassescargo clippy --all-targets --all-features -- -D warningspassesSummary by CodeRabbit