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

ghstack command won't work if some PR has been closed #2

Closed
zasdfgbnm opened this issue Apr 6, 2019 · 2 comments
Closed

ghstack command won't work if some PR has been closed #2

zasdfgbnm opened this issue Apr 6, 2019 · 2 comments

Comments

@zasdfgbnm
Copy link

zasdfgbnm commented Apr 6, 2019

I am trying to modify pytorch/pytorch#18650 (comment) by checking out the corresponding commits in master branch, modify the file, and git commit --amend and then run ghstack, but I get an error:

# Updating https://github.com/pytorch/pytorch/pull/18648
ERROR: Fatal exception
Traceback (most recent call last):
  File "/home/gaoxiang/.virtualenvs/pt/lib/python3.7/site-packages/ghstack/__main__.py", line 153, in main
    update_fields=args.update_fields
  File "/home/gaoxiang/.virtualenvs/pt/lib/python3.7/site-packages/ghstack/submit.py", line 153, in main
    submitter.post_process()
  File "/home/gaoxiang/.virtualenvs/pt/lib/python3.7/site-packages/ghstack/submit.py", line 594, in post_process
    base=s.base)
  File "/home/gaoxiang/.virtualenvs/pt/lib/python3.7/site-packages/ghstack/github.py", line 50, in patch
    return self.rest('patch', path, **kwargs)
  File "/home/gaoxiang/.virtualenvs/pt/lib/python3.7/site-packages/ghstack/github_real.py", line 98, in rest
    r.raise_for_status()
  File "/home/gaoxiang/.virtualenvs/pt/lib/python3.7/site-packages/requests/models.py", line 939, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://api.github.com/repos/pytorch/pytorch/pulls/18648

I think this is because the corresponding PR (pytorch/pytorch#18648) has been landed and closed.

In such case, instead of failing with error, should we just skip modifying that PR and continue?

@zasdfgbnm zasdfgbnm changed the title ghstack command no longer work if some PR has been closed ghstack command won't work if some PR has been closed Apr 7, 2019
@ezyang
Copy link
Owner

ezyang commented Apr 8, 2019

Fixed on head, please give it a try!

@ezyang ezyang closed this as completed Apr 8, 2019
@zasdfgbnm
Copy link
Author

Tested to be working. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants