Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/181506
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New Failure, 1 PendingAs of commit 28f92bb with merge base a528959 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
When a ghstack PR fails to merge because a parent PR in the stack lacks required approvals, the error surfaced from `find_matching_merge_rule` gives no hint about which PR in the stack is missing approval. The user sees "Approvers from one of the following sets are needed: ..." on the top PR even though the parent is the one missing reviewers, which makes it confusing to debug (e.g. PR pytorch#181437 hit this where the parent PR pytorch#181434 was the one without core approval). Wrap the per-PR `find_matching_merge_rule` call in `merge_ghstack_into` to re-raise with the failing PR number prefixed, preserving the original exception type so callers that distinguish `MandatoryChecksMissingError` from `MergeRuleFailedError` keep working. Authored with Claude.
bfc9fee to
28f92bb
Compare
|
@pytorchmergebot merge -f "don't care about XPU tests for this infra change" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…81506) ## Summary When a ghstack PR fails to merge because a parent PR in the stack lacks required approvals (or required checks), the error surfaced by `merge_ghstack_into` gives no hint about which PR in the stack is the problem. The user sees something like: > Approvers from one of the following sets are needed: > - superuser (pytorch/metamates) > - Core Reviewers (...) > - Core Maintainers (...) …posted on the top PR — even though it's actually a parent that needs the approval. This just hit pytorch#181437: the top PR only changes `.github/workflows/pull.yml` (covered by the OSS CI rule, fully approved), but the parent pytorch#181434 only changes `torchgen/gen.py`, which has no specific merge rule and falls through to the catch-all `*` rules requiring Core Reviewers / Core Maintainers / superuser. None of the parent's reviewers were in those sets, but the merge bot only ever named the top PR. ## Change Wrap the per-PR `find_matching_merge_rule` call inside `merge_ghstack_into` to re-raise with the failing PR number prefixed, preserving the original exception subclass (so callers that distinguish `MandatoryChecksMissingError` from `MergeRuleFailedError` keep working — that distinction drives retry behavior at trymerge.py:2391/2444). After this PR, the same failure surfaces as: > Merge rule check failed for stacked PR pytorch#181434: > > Approvers from one of the following sets are needed: … ## Test plan - [x] Added `test_merge_ghstack_into_wraps_parent_rule_error` — verifies the failing parent's PR number appears in the message and the exception is `MergeRuleFailedError` but **not** the `MandatoryChecksMissingError` subclass. - [x] Added `test_merge_ghstack_into_preserves_mandatory_checks_subclass` — verifies a `MandatoryChecksMissingError` from a parent stays a `MandatoryChecksMissingError` so retry behavior keeps working. - [x] `pytest .github/scripts/test_trymerge.py::TestGitHubPRGhstackDependencies` — 4 passed, 1 skipped (pre-existing). Authored with Claude. Pull Request resolved: pytorch#181506 Approved by: https://github.com/huydhn
…81506) ## Summary When a ghstack PR fails to merge because a parent PR in the stack lacks required approvals (or required checks), the error surfaced by `merge_ghstack_into` gives no hint about which PR in the stack is the problem. The user sees something like: > Approvers from one of the following sets are needed: > - superuser (pytorch/metamates) > - Core Reviewers (...) > - Core Maintainers (...) …posted on the top PR — even though it's actually a parent that needs the approval. This just hit pytorch#181437: the top PR only changes `.github/workflows/pull.yml` (covered by the OSS CI rule, fully approved), but the parent pytorch#181434 only changes `torchgen/gen.py`, which has no specific merge rule and falls through to the catch-all `*` rules requiring Core Reviewers / Core Maintainers / superuser. None of the parent's reviewers were in those sets, but the merge bot only ever named the top PR. ## Change Wrap the per-PR `find_matching_merge_rule` call inside `merge_ghstack_into` to re-raise with the failing PR number prefixed, preserving the original exception subclass (so callers that distinguish `MandatoryChecksMissingError` from `MergeRuleFailedError` keep working — that distinction drives retry behavior at trymerge.py:2391/2444). After this PR, the same failure surfaces as: > Merge rule check failed for stacked PR pytorch#181434: > > Approvers from one of the following sets are needed: … ## Test plan - [x] Added `test_merge_ghstack_into_wraps_parent_rule_error` — verifies the failing parent's PR number appears in the message and the exception is `MergeRuleFailedError` but **not** the `MandatoryChecksMissingError` subclass. - [x] Added `test_merge_ghstack_into_preserves_mandatory_checks_subclass` — verifies a `MandatoryChecksMissingError` from a parent stays a `MandatoryChecksMissingError` so retry behavior keeps working. - [x] `pytest .github/scripts/test_trymerge.py::TestGitHubPRGhstackDependencies` — 4 passed, 1 skipped (pre-existing). Authored with Claude. Pull Request resolved: pytorch#181506 Approved by: https://github.com/huydhn
…81506) ## Summary When a ghstack PR fails to merge because a parent PR in the stack lacks required approvals (or required checks), the error surfaced by `merge_ghstack_into` gives no hint about which PR in the stack is the problem. The user sees something like: > Approvers from one of the following sets are needed: > - superuser (pytorch/metamates) > - Core Reviewers (...) > - Core Maintainers (...) …posted on the top PR — even though it's actually a parent that needs the approval. This just hit pytorch#181437: the top PR only changes `.github/workflows/pull.yml` (covered by the OSS CI rule, fully approved), but the parent pytorch#181434 only changes `torchgen/gen.py`, which has no specific merge rule and falls through to the catch-all `*` rules requiring Core Reviewers / Core Maintainers / superuser. None of the parent's reviewers were in those sets, but the merge bot only ever named the top PR. ## Change Wrap the per-PR `find_matching_merge_rule` call inside `merge_ghstack_into` to re-raise with the failing PR number prefixed, preserving the original exception subclass (so callers that distinguish `MandatoryChecksMissingError` from `MergeRuleFailedError` keep working — that distinction drives retry behavior at trymerge.py:2391/2444). After this PR, the same failure surfaces as: > Merge rule check failed for stacked PR pytorch#181434: > > Approvers from one of the following sets are needed: … ## Test plan - [x] Added `test_merge_ghstack_into_wraps_parent_rule_error` — verifies the failing parent's PR number appears in the message and the exception is `MergeRuleFailedError` but **not** the `MandatoryChecksMissingError` subclass. - [x] Added `test_merge_ghstack_into_preserves_mandatory_checks_subclass` — verifies a `MandatoryChecksMissingError` from a parent stays a `MandatoryChecksMissingError` so retry behavior keeps working. - [x] `pytest .github/scripts/test_trymerge.py::TestGitHubPRGhstackDependencies` — 4 passed, 1 skipped (pre-existing). Authored with Claude. Pull Request resolved: pytorch#181506 Approved by: https://github.com/huydhn
Summary
When a ghstack PR fails to merge because a parent PR in the stack lacks required approvals (or required checks), the error surfaced by
merge_ghstack_intogives no hint about which PR in the stack is the problem. The user sees something like:…posted on the top PR — even though it's actually a parent that needs the approval.
This just hit #181437: the top PR only changes
.github/workflows/pull.yml(covered by the OSS CI rule, fully approved), but the parent #181434 only changestorchgen/gen.py, which has no specific merge rule and falls through to the catch-all*rules requiring Core Reviewers / Core Maintainers / superuser. None of the parent's reviewers were in those sets, but the merge bot only ever named the top PR.Change
Wrap the per-PR
find_matching_merge_rulecall insidemerge_ghstack_intoto re-raise with the failing PR number prefixed, preserving the original exception subclass (so callers that distinguishMandatoryChecksMissingErrorfromMergeRuleFailedErrorkeep working — that distinction drives retry behavior at trymerge.py:2391/2444).After this PR, the same failure surfaces as:
Test plan
test_merge_ghstack_into_wraps_parent_rule_error— verifies the failing parent's PR number appears in the message and the exception isMergeRuleFailedErrorbut not theMandatoryChecksMissingErrorsubclass.test_merge_ghstack_into_preserves_mandatory_checks_subclass— verifies aMandatoryChecksMissingErrorfrom a parent stays aMandatoryChecksMissingErrorso retry behavior keeps working.pytest .github/scripts/test_trymerge.py::TestGitHubPRGhstackDependencies— 4 passed, 1 skipped (pre-existing).Authored with Claude.