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

Expose some errors #25

Open
tj opened this issue May 5, 2020 · 11 comments
Open

Expose some errors #25

tj opened this issue May 5, 2020 · 11 comments

Comments

@tj
Copy link
Owner

tj commented May 5, 2020

Right now v2+ fail just due to how Go modules work, but in any case it might be nice to expose some errors, otherwise it's just a silent 500 and people are probably wondering what's going on.

For example:

building: exit status 1: go: finding github.com/nats-io/nats-server v2.1.6
go: finding github.com/nats-io/nats-server v2.1.6
go: errors parsing go.mod: /home/go.mod:5: require github.com/nats-io/nats-server: version "v2.1.6" invalid: module contains a go.mod file,
so major version must be compatible: should be v0 or v1, not v2

I'm not sure what would be best here, typically not a great idea to expose internal issues.

@wallyqs
Copy link
Contributor

wallyqs commented May 5, 2020

Thanks for the update! I was wondering what was going on, just confirmed that the last NATS v1 series is able to be be installed without issues:

curl -sf https://gobinaries.com/nats-io/[email protected] | sh
  ==> Downloading github.com/nats-io/[email protected]
  ==> Downloading binary for darwin amd64
  ==> Installing nats-server to /usr/local/bin
  ==> Installation complete

@mblarsen
Copy link

mblarsen commented May 7, 2020

Yeah, I'm assuming https://github.com/caddyserver/caddy@2 is failing because of Go 1.14 requirement.

Do you have any concerns exposing something that shouldn't be exposed?

Also, I can imagine many 500 won't make much sense to the end user, but probably coupled with some random error token it could be useful for debugging an issue.

@tj
Copy link
Owner Author

tj commented May 7, 2020

@mblarsen yep same thing:

building: exit status 1: go: finding github.com/caddyserver/caddy v2.0.0
go: finding github.com/caddyserver/caddy v2.0.0
go: errors parsing go.mod:
/home/go.mod:5: require github.com/caddyserver/caddy: version "v2.0.0" invalid: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

@wallyqs
Copy link
Contributor

wallyqs commented May 8, 2020

Hi @tj , just made a small PR to solve this issue here. Confirmed that works now for NATS builds: #27

@wallyqs
Copy link
Contributor

wallyqs commented May 8, 2020

Btw for caddy support is going to be slightly trickier for v2, since the current approach needs the main to be at the root level of the repo and for caddy this is at cmd/main.go, so with v2 module support the path to install caddy v2 would have to be like this for go get

go get github.com/caddyserver/caddy/v2/[email protected]

@tj
Copy link
Owner Author

tj commented May 12, 2020

Hmm maybe the @version should be optional in these cases, looks a bit awkward haha

@wallyqs
Copy link
Contributor

wallyqs commented May 26, 2020

Thanks again @tj. An update on this one, since this is fixed #27 it should be possible for the server to build caddy, but still won't work right now (probably) because takes caddy takes longer than 100 seconds to be built.

@tj
Copy link
Owner Author

tj commented May 27, 2020

ahh darn, might not be a reasonable way around that since it's a Cloudflare limitation (without some enterprise package at least). #16 might be relevant since Caddy has binaries already, it could just serve/cache those

@yujunz
Copy link

yujunz commented Jun 26, 2020

It would be good to give an error on 100s timeout.

@tj
Copy link
Owner Author

tj commented Jun 26, 2020

@yujunz yeah we'd probably have to time out a bit earlier in Go to have a chance to respond, but SGTM

@alvintangz
Copy link

alvintangz commented May 20, 2021

Getting a 500 error for Vaccine-Hunters-Canada/VaxFinder-admin-cli. It would be nice to have an error message provided somewhere in order to know how to proceed.

curl -sf https://gobinaries.com/Vaccine-Hunters-Canada/[email protected] | sh

  ==> Downloading github.com/Vaccine-Hunters-Canada/[email protected]
  ==> Downloading binary for darwin amd64

  Error downloading, got 500 response from server

(since this post I've removed v1.0.1 tag from the repo and v0.0.0 exists but still doesn't work)

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

5 participants