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

Bug: bin is not able to locate releases on Github for bufbuild/buf #84

Closed
breml opened this issue Mar 24, 2021 · 7 comments · May be fixed by #87
Closed

Bug: bin is not able to locate releases on Github for bufbuild/buf #84

breml opened this issue Mar 24, 2021 · 7 comments · May be fixed by #87

Comments

@breml
Copy link
Collaborator

breml commented Mar 24, 2021

I tried to install with the following command:

$ bin install github.com/bufbuild/buf
   • Getting latest release for bufbuild/buf
   ⨯ command failed            error=GET https://api.github.com/repos/bufbuild/buf/releases/latest: 404 Not Found []

But there are clearly releases available on https://github.com/bufbuild/buf/releases
I have not yet investigated, where bin is failing.

I am using the latest build:

$ bin --version
bin version 0.5.0
commit: 7cec71d7c1b77e3db749c010630a8c36122e2801
built at: 2021-03-24T04:11:25Z
built by: goreleaser
@sirlatrom
Copy link
Collaborator

They are all prereleases, and I think those are actively being filtered out at the moment

@marcosnils
Copy link
Owner

They are all prereleases, and I think those are actively being filtered out at the moment

That's correct.

Close?

@sirlatrom
Copy link
Collaborator

Close?

Works by pointing to the particular pre-release in case you want it:

$ bin install https://github.com/bufbuild/buf/releases/tag/v0.40.0
   • Getting v0.40.0 release for bufbuild/buf

Multiple matches found, please select one:

 [1] buf-Linux-x86_64
 [2] buf-Linux-x86_64.tar.gz
 [3] protoc-gen-buf-breaking-Linux-x86_64
 [4] protoc-gen-buf-check-breaking-Linux-x86_64
 [5] protoc-gen-buf-check-lint-Linux-x86_64
 [6] protoc-gen-buf-lint-Linux-x86_64
 Select an option: 1
   • Starting download of https://github.com/bufbuild/buf/releases/download/v0.40.0/buf-Linux-x86_64
16.40 MiB / 16.40 MiB [-----------------------------------------------------------------------] 100.00% 19.93 MiB p/s 1s
   • Copying for buf@v0.40.0 into /home/sune/bin/buf
   • Done installing buf v0.40.0

@breml
Copy link
Collaborator Author

breml commented Mar 24, 2021

Sorry, but I have to reopen this issue again, because the above mentioned workaround does break bin update and is therefore not suitable.

I installed buf with the command mentioned above:

$ bin install https://github.com/bufbuild/buf/releases/tag/v0.40.0                               
   • Getting v0.40.0 release for bufbuild/buf                                                                          
                                                                                                                       
Multiple matches found, please select one:                                                                             
                                                                                                                       
 [1] buf-Linux-x86_64                                                                                                                                                                                                                         
 [2] buf-Linux-x86_64.tar.gz                                                                                           
 [3] protoc-gen-buf-breaking-Linux-x86_64                                                                              
 [4] protoc-gen-buf-check-breaking-Linux-x86_64                                                                        
 [5] protoc-gen-buf-check-lint-Linux-x86_64                                                                                                                                                                                                   
 [6] protoc-gen-buf-lint-Linux-x86_64                                                                                  
 Select an option: 1                                                                                                   
   • Starting download of https://github.com/bufbuild/buf/releases/download/v0.40.0/buf-Linux-x86_64                   
16.40 MiB / 16.40 MiB [---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 12.12 MiB p/s 1s
   • Copying for buf@v0.40.0 into <redacted>/bin/buf                                                                                                                                                                                          
   • Done installing buf v0.40.0

If I execute update right after, bin fails and I am no longer able to update any tool.

$ bin update
   ⨯ command failed            error=Error checking updates for /home/lubr/bin/buf, GET https://api.github.com/repos/bufbuild/buf/releases/latest: 404 Not Found []

So we could argue, that we now have a different issue that is, if one of the updates are misbehaving, all updates are blocked.

For the support of pre-releases I created a new feature request: #86

@sirlatrom
Copy link
Collaborator

sirlatrom commented Mar 24, 2021

@breml I added a fix specifically for GitHub repos with only prereleases in #87. Doesn't offer any opt-in mechanism other than starting out with a specific prerelease URL, e.g.:

<user>@<host>:~/src/marcosnils/bin$ bin install https://github.com/bufbuild/buf/releases/tag/v0.39.0
   • Getting v0.39.0 release for bufbuild/buf

Multiple matches found, please select one:

 [1] buf-Linux-x86_64
 [2] buf-Linux-x86_64.tar.gz
 [3] protoc-gen-buf-breaking-Linux-x86_64
 [4] protoc-gen-buf-check-breaking-Linux-x86_64
 [5] protoc-gen-buf-check-lint-Linux-x86_64
 [6] protoc-gen-buf-lint-Linux-x86_64
 Select an option: 1
   • Starting download of https://github.com/bufbuild/buf/releases/download/v0.39.0/buf-Linux-x86_64
16.34 MiB / 16.34 MiB [-----------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 14.86 MiB p/s 2s
   • Copying for buf@v0.39.0 into /home/<redacted>/bin/buf
   • Done installing buf v0.39.0
<user>@<host>:~/src/marcosnils/bin$ bin update
   • /home/<redacted>/bin/buf v0.39.0 -> v0.40.0 (https://github.com/bufbuild/buf/releases/tag/v0.40.0)

Do you want to continue? [Y/n] Y
   • Getting v0.40.0 release for bufbuild/buf

Multiple matches found, please select one:

 [1] buf-Linux-x86_64
 [2] buf-Linux-x86_64.tar.gz
 [3] protoc-gen-buf-breaking-Linux-x86_64
 [4] protoc-gen-buf-check-breaking-Linux-x86_64
 [5] protoc-gen-buf-check-lint-Linux-x86_64
 [6] protoc-gen-buf-lint-Linux-x86_64
 Select an option: 1
   • Starting download of https://github.com/bufbuild/buf/releases/download/v0.40.0/buf-Linux-x86_64
16.40 MiB / 16.40 MiB [-----------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 14.77 MiB p/s 1s
   • Copying for buf@v0.40.0 into /home/<redacted>/bin/buf
   • Done updating /home/<redacted>/bin/buf to v0.40.0

PS: We may want to consider storing the user's choice of release asset for smoother updates?

@marcosnils
Copy link
Owner

Let's close and continue con #86 ?

@breml
Copy link
Collaborator Author

breml commented Mar 25, 2021

Fine with me.

@breml breml closed this as completed Mar 25, 2021
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

Successfully merging a pull request may close this issue.

3 participants