Repository navigation
ci: cancel superseded PR runs in presubmit workflows - #9697
Merged
Merged
Conversation
Configure concurrency groups on presubmit.yaml, windows-presubmit.yaml, presubmit-bun.yml, and generator-tests.yaml to cancel in-progress runs when a newer commit is pushed to the same pull request, matching breaking-change-check.yaml, generation_check.yaml, and librarian_tidy.yml. Scope cancel-in-progress on generator-tests.yaml to pull_request events so post-merge push runs on main always complete.
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
quirogas
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context & Problem
breaking-change-check.yaml,generation_check.yaml, andlibrarian_tidy.ymlconfigure aconcurrencygroup to cancel in-progress runs when a new commit is pushed to the same pull request. However,presubmit.yaml,windows-presubmit.yaml,presubmit-bun.yml, andgenerator-tests.yamldo not have aconcurrencygroup configured.As a result, pushing follow-up commits to an open PR (or
release-please[bot]updatingrelease-please--branches--mainas PRs merge) leaves outdated runs executing in parallel with the latest commit—accounting for ~171 superseded PR runs (~614 obsolete jobs / ~35 runner-hours) over a recent 14-day window.Summary of Changes
concurrencygroup (${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}) withcancel-in-progress: trueto:.github/workflows/presubmit.yaml.github/workflows/windows-presubmit.yaml.github/workflows/presubmit-bun.ymlconcurrencygroup to.github/workflows/generator-tests.yamlwithcancel-in-progress: ${{ github.event_name == 'pull_request' }}so superseded PR runs are cancelled while post-mergepushruns onmainalways run to completion.Verification
presubmit.yaml,windows-presubmit.yaml, andpresubmit-bun.ymltrigger exclusively onpull_request, and scopedcancel-in-progressingenerator-tests.yamltogithub.event_name == 'pull_request'.