chore(ci): use !cancelled() instead of always() for final job#461
Conversation
Combined with the workflow's `cancel-in-progress` group, `if: always()` overrides cancellation and runs the aggregator even on superseded commits. `!cancelled()` still runs on upstream success or failure but skips when the workflow is cancelled. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Greptile SummarySwitches the Confidence Score: 5/5Safe to merge — single-line CI config change with no functional regressions. The change is minimal, semantically correct, and well-explained. No logic, security, or correctness issues identified. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[New commit pushed] --> B{cancel-in-progress}
B -- "cancels previous run" --> C[Upstream jobs cancelled]
B -- "current run proceeds" --> D[ci-bats / ci-other / msrv]
C --> E{"final job condition"}
D --> E
E -- "always() — OLD" --> F[final runs anyway\nwastes runner + noisy annotations]
E -- "!cancelled() — NEW" --> G{Is workflow cancelled?}
G -- "yes" --> H[final is skipped ✓]
G -- "no" --> I[final runs and checks results ✓]
Reviews (1): Last reviewed commit: "chore(ci): use !cancelled() instead of a..." | Re-trigger Greptile |
Summary
cancel-in-progressgroup,if: always()overrides cancellation and runs thefinalaggregator even on superseded commits.!cancelled()still runs on upstream success or failure but skips when the workflow is cancelled — saves a runner and avoids confusing error annotations on already-superseded shas.final-aggregator pattern +cancel-in-progress: truehere, so the same fix applies.Test plan
🤖 Generated with Claude Code
Note
Low Risk
Low risk CI-only change that only affects when the
finalaggregator job runs; no product code is modified.Overview
Updates the CI workflow so the
finalaggregator job runs for upstream success/failure but does not run when the workflow is cancelled, replacingif: always()withif: ${{ !cancelled() }}to avoid consuming runners and reporting failures on superseded commits.Reviewed by Cursor Bugbot for commit a2f7240. Bugbot is set up for automated code reviews on this repo. Configure here.