S-138738: Cancel superseded CI runs on pull requests - #3
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: e7dcb5362d
ℹ️ 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.
Exclude push events from the concurrency group
When three or more main pushes arrive before the first run finishes, they all enter this concurrency group. Setting cancel-in-progress to false protects only the running push: GitHub permits at most one running and one pending run per group and replaces an existing pending run when another is queued. The replacement run scans only its own ${{ github.event.before }}..${{ github.sha }} range (lines 54–61), so commits unique to the canceled pending push are never checked for secrets. Make the group unique for push runs while retaining the shared PR-ref group.
Useful? React with 👍 / 👎.
Why
Every push to an open pull request here starts a fresh run of
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