Repository navigation
Avoid duplicate PR push runs and fix main branch concurrency group. - #2929
Merged
Merged
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
copybara-service
Bot
force-pushed
the
test_1014903546
branch
from
November 8, 2026 18:22
e1340fc to
017a2e0
Compare
The GitHub Actions workflow in .github/workflows/pytest.yml triggers on both `pull_request` (targeting `main`) and unfiltered `push` events. Because Copybara presubmit exports push in-repo `test_<CL>` branches and open a pull request against `main`, every presubmit snapshot triggers two 12-shard test runs simultaneously (`push` on `refs/heads/test_<CL>` and `pull_request` on `refs/pull/<PR>/merge`), and every CL submission triggers three 12-shard runs. In addition, `concurrency.group` checks `refs/heads/master` instead of `refs/heads/main`, and `cancel-in-progress` only matches `refs/pull/`, leaving superseded `push` runs on `test_<CL>` branches running to completion. Scope the `push` trigger to `main` so in-repo `test_<CL>` branches run once via the `pull_request` trigger (which still attaches all 12 shard check runs to the PR head commit SHA for Copybara presubmit checks). Update `concurrency.group` to check `refs/heads/main` and set `cancel-in-progress` to `github.event_name == 'pull_request'`. Over a 72-hour window, overlapping and duplicate branch/PR runs accounted for 301.3 of 674.9 runner-hours (18,078 runner-minutes, or 44.6% of the repository's Actions usage, equivalent to roughly 180,000 runner-minutes per month). PiperOrigin-RevId: 1016812766
copybara-service
Bot
force-pushed
the
test_1014903546
branch
from
November 8, 2026 18:34
017a2e0 to
b53645a
Compare
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.
Avoid duplicate PR push runs and fix main branch concurrency group.
The GitHub Actions workflow in .github/workflows/pytest.yml triggers on both
pull_request(targetingmain) and unfilteredpushevents. Because Copybara presubmit exports push in-repotest_<CL>branches and open a pull request againstmain, every presubmit snapshot triggers two 12-shard test runs simultaneously (pushonrefs/heads/test_<CL>andpull_requestonrefs/pull/<PR>/merge), and every CL submission triggers three 12-shard runs. In addition,concurrency.groupchecksrefs/heads/masterinstead ofrefs/heads/main, andcancel-in-progressonly matchesrefs/pull/, leaving supersededpushruns ontest_<CL>branches running to completion.Scope the
pushtrigger tomainso in-repotest_<CL>branches run once via thepull_requesttrigger (which still attaches all 12 shard check runs to the PR head commit SHA for Copybara presubmit checks). Updateconcurrency.groupto checkrefs/heads/mainand setcancel-in-progresstogithub.event_name == 'pull_request'. Over a 72-hour window, overlapping and duplicate branch/PR runs accounted for 301.3 of 674.9 runner-hours (18,078 runner-minutes, or 44.6% of the repository's Actions usage, equivalent to roughly 180,000 runner-minutes per month).