Deduplicate CI runs and finish full matrices - #1003
Conversation
Both workflows triggered on push and pull_request for every branch, so each pull request ran the whole matrix twice against the same commit: one run per event, 50+ jobs each. Restricting push to main leaves pull requests as the single trigger for branch work. A concurrency group keyed on head_ref also retires a pull request's earlier runs when it is pushed again; pushes to main key on run_id so they always finish. The project and build matrices had no fail-fast setting, so one failing leg cancelled its siblings -- a single flaky ubuntu job would take the macOS and Windows results with it and hide whether they passed. The legacy nats matrix already set fail-fast: false; do the same for the other two.
|
Claude finished @caspervonb's task in 1m 11s —— View job Code Review
The changes are correct and well-structured. A few observations: Concurrency group formula (
Tradeoff (no CI for pushes to branches without an open PR) is the right call for a repo that uses PRs as the standard review gate. It's documented clearly in the PR description and in the inline comment. No correctness issues, security concerns, or performance implications. LGTM. |
Every PR was running the whole matrix twice against the same commit, because both workflows trigger on
pushandpull_requestfor all branches. On #1002 that produced twotestruns for the same SHA 12 seconds apart, one of which showed up as a confusingcancelled.Restricting
pushtomainleavespull_requestas the single trigger for branch work. The concurrency group additionally retires a PR's earlier runs when it is pushed again;mainpushes key onrun_idso they always finish.Separately, the
projectandbuildmatrices had nofail-fastsetting, so one failing leg cancelled its siblings — a single flaky ubuntu job took the macOS and Windows results with it (10-15 cancelled jobs on #938, #941 and #1002). The legacynatsmatrix already setsfail-fast: false.Note the tradeoff: pushes to a branch with no open PR no longer get CI.