fix(ci): preserve in-progress runs on release/* branches#4883
Conversation
Previously cancel-in-progress was only disabled for main, so a back-to-back push to release/v1.1.0-incubating cancelled the prior run mid-flight and left release branches with partial CI signal. Release branches share main's "production" risk profile, so apply the same exemption. Closes apache#4882
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4883 +/- ##
============================================
+ Coverage 42.39% 43.13% +0.74%
- Complexity 2155 2222 +67
============================================
Files 954 1000 +46
Lines 34694 39257 +4563
Branches 3629 4541 +912
============================================
+ Hits 14707 16935 +2228
- Misses 19083 21072 +1989
- Partials 904 1250 +346
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the Required Checks GitHub Actions workflow concurrency settings so that CI runs on release/** branches are not cancelled when multiple commits are pushed in quick succession, matching the existing behavior for main and preserving full CI signal on production-risk branches.
Changes:
- Extend the
concurrency.cancel-in-progressexemption from onlymainto also includerelease/**branches.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
### What changes were proposed in this PR?
Extend the `cancel-in-progress` exemption in `required-checks.yml` so it
covers `release/**` branches in addition to `main`. Both branches show
up in the `push:` trigger and share the same "production" risk profile —
a back-to-back push (e.g. when a backport applies a follow-up commit)
currently cancels the prior in-progress run mid-flight, leaving release
branches with incomplete CI signal.
```yaml
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') }}
```
PR head (feature branches), `ci-enable/**`, and `workflow_dispatch` on
non-protected refs continue to cancel-in-progress as before.
### Any related issues, documentation, discussions?
Closes #4882
### How was this PR tested?
The change is a single-line GitHub expression edit; static-validated by
`python3 -c 'import yaml; yaml.safe_load(open(...))'`. Behavior is
contract-tested by GitHub's expression engine semantics (the existing
`${{ github.ref != 'refs/heads/main' }}` form is just being conjoined
with a `startsWith` check). Manual end-to-end verification will be done
after merge by pushing two commits back-to-back to a `release/*` branch
and confirming the first run completes instead of being cancelled.
### Was this PR authored or co-authored using generative AI tooling?
(backported from commit 332d4f4)
Generated-by: Claude Code (Opus 4.7)
|
Backport to |
What changes were proposed in this PR?
Extend the
cancel-in-progressexemption inrequired-checks.ymlso it coversrelease/**branches in addition tomain. Both branches show up in thepush:trigger and share the same "production" risk profile — a back-to-back push (e.g. when a backport applies a follow-up commit) currently cancels the prior in-progress run mid-flight, leaving release branches with incomplete CI signal.PR head (feature branches),
ci-enable/**, andworkflow_dispatchon non-protected refs continue to cancel-in-progress as before.Any related issues, documentation, discussions?
Closes #4882
How was this PR tested?
The change is a single-line GitHub expression edit; static-validated by
python3 -c 'import yaml; yaml.safe_load(open(...))'. Behavior is contract-tested by GitHub's expression engine semantics (the existing${{ github.ref != 'refs/heads/main' }}form is just being conjoined with astartsWithcheck). Manual end-to-end verification will be done after merge by pushing two commits back-to-back to arelease/*branch and confirming the first run completes instead of being cancelled.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)