Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two #74

Open
wants to merge 1 commit into
base: gh/malfet/23/base
Choose a base branch
from
Open

Two #74

wants to merge 1 commit into from

Conversation

malfet
Copy link
Owner

@malfet malfet commented Dec 27, 2023

Stack from ghstack (oldest at bottom):

[ghstack-poisoned]
This was referenced Dec 27, 2023
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

pytorchmergebot pushed a commit that referenced this pull request Dec 27, 2023
Pull Request resolved: #75
Approved by:
ghstack dependencies: #73, #74
@malfet
Copy link
Owner Author

malfet commented Dec 27, 2023

@pytorchbot revert -m "Two makes a pair" -c weird

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

@malfet your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Dec 27, 2023
This reverts commit 8b11840.

Reverted #75 on behalf of https://github.com/malfet due to Two makes a pair ([comment](#74 (comment)))
pytorchmergebot added a commit that referenced this pull request Dec 27, 2023
This reverts commit af99e57.

Reverted #74 on behalf of https://github.com/malfet due to Two makes a pair ([comment](#74 (comment)))
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Dec 27, 2023
By adding `get_ghstack_dependent_prs` that using `git branch --contains`
finds all PRs containing stacked branch, selecting longest one (in
terms of distance between origin and default branch) and skipping all
open PRs

Please note, that reverts should be applied in a reversed order with the
one how PRs were landed originally.

Use a bit of a defensive programming, i.e. revert single PR if attempt to fetch dependencies fails for some reason.

Test plan:
 - Lint
 -  ```
    >>> from trymerge import GitRepo, GitHubPR, get_ghstack_prs, get_ghstack_dependent_prs
    >>> pr=GitHubPR("pytorch", "pytorch", 115188)
    >>> pr1=GitHubPR("pytorch", "pytorch", 115210)
    >>> repo=GitRepo("/Users/nshulga/git/pytorch/pytorch")
    >>> get_ghstack_dependent_prs(repo, pr1)
    [('22742d93a5357c9b5b45a74f91a6dc5599c9c266', <trymerge.GitHubPR object at 0x100f32f40>)]
    >>> get_ghstack_dependent_prs(repo, pr)
    [('22742d93a5357c9b5b45a74f91a6dc5599c9c266', <trymerge.GitHubPR object at 0x10102eaf0>), ('76b1d44d576c20be79295810904c589241ca1bd2', <trymerge.GitHubPR object at 0x10102eb50>)]
    >>> rc=get_ghstack_dependent_prs(repo, pr)
    rc[0]>>> rc[0][1].pr_num
    115210
    >>> rc[1][1].pr_num
    115188
    ```
 - see: malfet/deleteme#59 (comment) and malfet/deleteme#74 (comment)

Fixes pytorch/test-infra#4845
Pull Request resolved: #116447
Approved by: https://github.com/huydhn
ghstack dependencies: #116446
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants