Repository navigation
trymerge: count only a label's own repeats in add_numbered_label - #202802
izaitsevfb wants to merge 2 commits into
Conversation
A substring match counted unrelated labels such as "mergedog", so those PRs were labeled mergedX1 instead of Merged on land.
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - Ready for human review:
Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/202802
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 30422a1 with merge base c393f2a ( 🟡 GREEN LIGHT - PR requires human review:
reason: FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Automated review of 30422a1: nothing blocking; ready for human review.
The PR changes GitHubPR.add_numbered_label in .github/scripts/trymerge.py so it counts only labels equal to label_base or fully matching <label_base>X<n>. Before, any label containing the base as a substring was counted (so an unrelated label like mergedog turned merged into mergedX1), and the same fix applies to the reverted path. Recommendation: Approve. Nothing blocks approval.
This review is AI-generated and advisory. Each new automated review replaces the previous one.
Withdrawn: the automated review of 30422a1 found nothing blocking.
huydhn
left a comment
There was a problem hiding this comment.
Good catch. This is a silly bug :)
|
✴️ iz2: |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…orch#202802) ✴️ iz2: `add_numbered_label("merged")` counted every label containing "merged", so a PR carrying the unrelated `mergedog` label landed as `mergedX1` instead of `Merged` (e.g. pytorch#202615, pytorch#202617; 90 PRs carry `mergedX1`). Anything that checks for `Merged` then reads these lands as closed unmerged. pytorch#98551 meant the numbering to count only the label's own repeats. This change counts only labels equal to the base or fully matching `<base>X<n>`. Matching stays case-sensitive on purpose. The repo labels are `Merged` and `Reverted`, which `"merged" in "Merged"` never matched, so re-merges have always kept plain `Merged` (no PR carries `Merged` + `mergedX1` without `mergedog`, and none carries `revertedX1`). This keeps that behaviour; only PRs with a substring-matching label change. Test plan: new `TestAddNumberedLabel` cases (`mergedog`, `mergedX1foo`/`mergedx1`, `Merged`, own repeats) fail on the old condition and pass with the fix. `python -m unittest test_trymerge`: 216 run, all pass except two git end-to-end tests that fail identically on unmodified main in my environment (tmp-dir cleanup `OSError`). Pull Request resolved: pytorch#202802 Approved by: https://github.com/huydhn
…orch#202802) ✴️ iz2: `add_numbered_label("merged")` counted every label containing "merged", so a PR carrying the unrelated `mergedog` label landed as `mergedX1` instead of `Merged` (e.g. pytorch#202615, pytorch#202617; 90 PRs carry `mergedX1`). Anything that checks for `Merged` then reads these lands as closed unmerged. pytorch#98551 meant the numbering to count only the label's own repeats. This change counts only labels equal to the base or fully matching `<base>X<n>`. Matching stays case-sensitive on purpose. The repo labels are `Merged` and `Reverted`, which `"merged" in "Merged"` never matched, so re-merges have always kept plain `Merged` (no PR carries `Merged` + `mergedX1` without `mergedog`, and none carries `revertedX1`). This keeps that behaviour; only PRs with a substring-matching label change. Test plan: new `TestAddNumberedLabel` cases (`mergedog`, `mergedX1foo`/`mergedx1`, `Merged`, own repeats) fail on the old condition and pass with the fix. `python -m unittest test_trymerge`: 216 run, all pass except two git end-to-end tests that fail identically on unmodified main in my environment (tmp-dir cleanup `OSError`). Pull Request resolved: pytorch#202802 Approved by: https://github.com/huydhn
✴️ iz2:
add_numbered_label("merged")counted every label containing "merged", so a PR carrying the unrelatedmergedoglabel landed asmergedX1instead ofMerged(e.g. #202615, #202617; 90 PRs carrymergedX1). Anything that checks forMergedthen reads these lands as closed unmerged. #98551 meant the numbering to count only the label's own repeats.This change counts only labels equal to the base or fully matching
<base>X<n>.Matching stays case-sensitive on purpose. The repo labels are
MergedandReverted, which"merged" in "Merged"never matched, so re-merges have always kept plainMerged(no PR carriesMerged+mergedX1withoutmergedog, and none carriesrevertedX1). This keeps that behaviour; only PRs with a substring-matching label change.Test plan: new
TestAddNumberedLabelcases (mergedog,mergedX1foo/mergedx1,Merged, own repeats) fail on the old condition and pass with the fix.python -m unittest test_trymerge: 216 run, all pass except two git end-to-end tests that fail identically on unmodified main in my environment (tmp-dir cleanupOSError).