Repository navigation
S-138738: Cancel superseded CI runs on pull requests - #40
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d03660d3d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # A new push to a pull request supersedes the run already in flight, and | ||
| # nothing downstream waits on the older one. Push events are exempt: a push | ||
| # run is the record that a given commit passed, so it always finishes. | ||
| group: ${{ github.workflow }}-${{ github.ref }} |
There was a problem hiding this comment.
Isolate push runs from the shared concurrency group
When three commits reach main before the first Gitleaks run finishes, all push runs share Gitleaks-refs/heads/main; setting cancel-in-progress to false preserves the running run but does not preserve the pending one, because GitHub replaces an existing pending run whenever another member of the same concurrency group is queued (GitHub's concurrency documentation). Consequently, the middle commit never runs, and the next invocation scans only its own event.before..github.sha range, so a secret introduced by the skipped commit and left untouched by the following commit can evade this workflow entirely. Use a unique group for push events while retaining the ref-based group for pull requests.
Useful? React with 👍 / 👎.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Why
Every push to an open pull request here starts a fresh run of
ci.yaml,gitleaks.ymlwhile the previous one keeps running, so a few rapid pushes bill duplicate suites to completion and delay the check anyone is actually waiting on. The durable-alpha side of this rollout is finished; this extends the same convention to the usestring org.Summary
concurrencyblock so a new push to an open PR cancels the run already in flight for that ref instead of queueing a second one.cancel-in-progressis only true forpull_request), so every commit on the default branch keeps its own complete passing record.Test plan