Repository navigation
ci: cancel outdated PR workflow runs on newer commits - #15309
Merged
Merged
Conversation
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
jinseopkim0
approved these changes
Dec 1, 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.
Configure PR-scoped
concurrencyacross PR workflows so superseded GitHub Actions runs are cancelled immediately when new commits are pushed, freeing up runner capacity.Summary of changes
concurrencyto 33 PR workflows (excludingchangelog_generation.yaml, which commits back to Release Please PRs):ci.yamlandformatter-version-check.yamlto use the same concurrency block:github.event.pull_request.number || github.run_idinstead ofgithub.head_refso fork PRs with identical branch names (such asmainorfix) do not cancel each other.cancel-in-progressstrictly topull_requestevents sopushtomain,schedule, andworkflow_dispatchruns each get a uniquegithub.run_idgroup and are never cancelled or blocked.conditional-required-check(requiredjob) in 7 workflows (ci.yaml,google-auth-library-java-ci.yaml,java-bigquery-jdbc-ci.yaml,java-spanner-jdbc-ci.yaml,java-storage-nio-ci.yaml,sdk-platform-java-downstream.yaml, andshowcase.yaml):if: ${{ always() }}withif: ${{ !cancelled() }}so cancelled runs stop without provisioning a newubuntu-22.04runner and conclude ascancelledinstead ofsuccess.contains(needs.*.result, 'cancelled')in the failure check step so a timed-out or cancelled upstream job cannot report a green check.Intentionally excluded
changelog_generation.yamlis left unchanged because itschangelog-generationjob only runs whengithub.event.sender.login == 'release-please[bot]'. Enablingcancel-in-progress: truethere could allow a subsequent non-bot push to cancel an in-flight Release Please run while skipping changelog generation.release,pushtomain,schedule, andworkflow_dispatch-only workflows) are untouched.