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

Failed bump-formula-pr can not be resumed #3150

Closed
4 tasks done
jessetan opened this issue Sep 12, 2017 · 4 comments
Closed
4 tasks done

Failed bump-formula-pr can not be resumed #3150

jessetan opened this issue Sep 12, 2017 · 4 comments

Comments

@jessetan
Copy link

  • Confirmed this is a problem with running a brew command and not brew installing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at the relevant tap e.g. for Homebrew/homebrew-core https://github.com/Homebrew/homebrew-core/issues/new
  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed all issues and retried your prior step?
  • Ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

Updating plantuml formula using bump-formula-pr

What happened (include command output)

Mistyped GitHub pw, output:

Error forking repository: Unauthorized (HTTP 401)
Bad credentials
Error: Failure while executing: hub fork --no-remote

Retrying command gives error message:

==> replace "https://downloads.sourceforge.net/project/plantuml/1.2017.16/plantuml.1.2017.16.jar" with "https://downloads.sourceforge.net/project/plantuml/1.2017.16/plantuml.1.2017.1
==> replace "a3d319ed54ed78ce3cf7bfcfe76ffc5aa6ed28a72b5aa575fe9125e0c6bd985c" with "a3d319ed54ed78ce3cf7bfcfe76ffc5aa6ed28a72b5aa575fe9125e0c6bd985c"
Error: You probably need to bump this formula manually since the new version
and old version are both 1.2017.16.

What you expected to happen

Retrying same command would attempt to resume where I left off, i.e. ask for pw again. Alternatively, running brew doctor or brew update/upgrade to bring Homebrew back into a working state where I can retry.

Step-by-step reproduction instructions (by running brew commands)

  1. brew bump-formula-pr --strict plantuml --url=https://downloads.sourceforge.net/project/plantuml/1.2017.16/plantuml.1.2017.16.jar --sha256=a3d319ed54ed78ce3cf7bfcfe76ffc5aa6ed28a72b5aa575fe9125e0c6bd985
  2. Fail GitHub autorization
  3. Goto 1
$ brew config
HOMEBREW_VERSION: 1.3.2-54-g66d5b06
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 66d5b06bbd33d75495233307030d07ff9e13f988
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: b2935e278ff047f3fe786129f783af8e4a0ccb2a
Core tap last commit: 9 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.1 build 802
Git: 2.14.1 => /usr/local/bin/git
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_91, 1.6.0_65-b14-468
macOS: 10.12.6-x86_64
Xcode: 8.3.3
CLT: N/A
X11: 2.7.11 => /opt/X11

$ brew doctor
Your system is ready to brew.
@MikeMcQuaid
Copy link
Member

It would be nice if this resumed from any aborted/failed state but that will add non-trivial code complexity so closing this issue out for now. Could you try and open a pull request? This document should help and we're happy to walk you through anything else.

Thanks!

@jessetan
Copy link
Author

@MikeMcQuaid I understand resuming requires non-trivial modifications, but is it possible to restore Homebrew to the state from before the failed bump-formula-pr using some reset command?

@JCount
Copy link
Contributor

JCount commented Sep 25, 2017

Are you perhaps stuck on a Git branch?

@jessetan
Copy link
Author

Homebrew located at /usr/local/Homebrew was on master, but after some spelunking I found that /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core was on a different branch indeed.
So the method to reset Homebrew to the proper state would be:

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git checkout master
git branch -D [branchname]

Not very user friendly. Perhaps Homebrew should clean up after itself when bump-formula-pr fails

@Homebrew Homebrew locked and limited conversation to collaborators Sep 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants