Repository navigation
Conversation
ghstack 0.16.0 (ezyang#342) combined the base, head and orig pushes into one `git push`, with a comment saying to go back to three grouped pushes if GitHub saw the base and head updates out of order. That seems to be happening: when an update also moves the base branch, GitHub often runs every pull_request workflow twice on the same head commit. Restore the grouped pushes (base, then head/next, then orig) for updates. New stack creation still uses one push, and direct mode is unchanged because it pushes no base branches.
huydhn
marked this pull request as ready for review
November 26, 2026 00:19
huydhn
added a commit
to pytorch/pytorch
that referenced
this pull request
Nov 26, 2026
Testing ezyang/ghstack#370. Will be closed. ghstack-source-id: a0648c9 Pull-Request: #206701
huydhn
added a commit
to pytorch/pytorch
that referenced
this pull request
Nov 26, 2026
Testing ezyang/ghstack#370. Will be closed. ghstack-source-id: 1747105 Pull-Request: #206701
huydhn
added a commit
to pytorch/pytorch
that referenced
this pull request
Nov 26, 2026
Testing ezyang/ghstack#370. Will be closed. ghstack-source-id: 7821f21 Pull-Request: #206701
huydhn
added a commit
to pytorch/pytorch
that referenced
this pull request
Nov 26, 2026
Testing ezyang/ghstack#370. Will be closed. ghstack-source-id: a7f5ce6 Pull-Request: #206701
huydhn
added a commit
to pytorch/pytorch
that referenced
this pull request
Nov 26, 2026
Testing ezyang/ghstack#370. Will be closed. ghstack-source-id: a4dab99 Pull-Request: #206701
huydhn
added a commit
to pytorch/pytorch
that referenced
this pull request
Nov 26, 2026
Testing ezyang/ghstack#370. Will be closed. ghstack-source-id: cb62f6c Pull-Request: #206701
huydhn
added a commit
to pytorch/pytorch
that referenced
this pull request
Nov 26, 2026
Testing ezyang/ghstack#370. Will be closed. ghstack-source-id: b47591f Pull-Request: #206701
huydhn
added a commit
to pytorch/pytorch
that referenced
this pull request
Nov 26, 2026
Testing ezyang/ghstack#370. Will be closed. ghstack-source-id: 37a5ccd Pull-Request: #206701
Contributor
Author
|
I tested this on a real 2-PR stack on pytorch/pytorch (pytorch/pytorch#206700, pytorch/pytorch#206701). There were 8 updates, and each one rebased onto a newer main commit, so the base branch moved every time. The updates alternated between this PR and its parent commit on
Creating the stack with this PR also gave no duplicates. CI runs on the test PRs were cancelled after counting. |
This branch has not been deployed
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.
ghstack 0.16.0 (#342) combined the base, head and orig pushes into one
git push. The code comment said to go back to three pushes if GitHub saw the base and head updates out of order. That seems to be happening.On pytorch/pytorch, when an update also moves the base branch, GitHub often runs every
pull_requestworkflow twice on the same head commit, starting in the same second. One run in each pair gets cancelled by concurrency settings at random. Example: pytorch/pytorch#206339. CI tools that look at a single run can then show the cancelled run (pytorch/test-infra#9616).Data from the latest update of 128 open ghstack PRs on pytorch/pytorch:
This PR restores the grouped pushes (base, then head/next, then orig) for updates. Creating a new stack still uses one push. Direct mode doesn't change, since it pushes no base branches. The cost is up to two extra pushes per
ghstack submit.Not a full revert of #342: its other speedups (narrower fetch, parallel PR lookups,
--no-fetch) and later work built on it stay as they are.Testing: lint is clean.
test/land/invalid_resubmit.py.testfails, but it fails the same way onmain.