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

cmd/go: 'go get' failed in go1.13beta1 if proxy serves non-404/410 response code #33032

Closed
oiooj opened this issue Jul 10, 2019 · 3 comments
Closed

Comments

@oiooj
Copy link
Member

@oiooj oiooj commented Jul 10, 2019

context

https://goproxy.io/github.com/@latest returns code 500, not 404, but this design found a bug in go1.13beta1.

description

if we run go get -v golang.org/x/tools/cmd/gopls

use go1.12:

Sosara@MBA:/tmp$ go get -v golang.org/x/tools/cmd/gopls
go: finding golang.org/x/tools/cmd/gopls latest
go: finding golang.org/x latest
go: finding golang.org latest
go: finding golang.org/x/tools/cmd latest
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468
go: extracting golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468
go: downloading golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: extracting golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: finding golang.org/x/sync v0.0.0-20190423024810-112230192c58

but use go1.13beta1

# go version
go version go1.13beta1 linux/amd64

# go get -v golang.org/x/tools/cmd/gopls
go: finding golang.org/x/text/language latest
go: finding golang.org latest
go: finding golang.org/x/text v0.3.2
go: finding golang.org/x latest
go: downloading golang.org/x/text v0.3.2
go: extracting golang.org/x/text v0.3.2
go get golang.org/x/text/language: module golang.org: reading https://goproxy.io/golang.org/@latest: 500 Internal Server Error

We already found the prefix, but the error also returned.
Introduced by https://go-review.googlesource.com/c/go/+/177958

@oiooj oiooj added the modules label Jul 10, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jul 10, 2019

Change https://golang.org/cl/185478 mentions this issue: cmd/go/internal/modload: ignore error if we found the prefix in queryPrefixModules

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jul 10, 2019

Why is the proxy returning status 500 for this path? That seems like the bug to fix.

(See previously #31913.)

@bcmills bcmills changed the title go get failed in go1.13beta1 if proxy server custom response code cmd/go: 'go get' failed in go1.13beta1 if proxy server custom response code Jul 10, 2019
@bcmills bcmills changed the title cmd/go: 'go get' failed in go1.13beta1 if proxy server custom response code cmd/go: 'go get' failed in go1.13beta1 if proxy serves non-404/410 response code Jul 10, 2019
@oiooj

This comment has been minimized.

Copy link
Member Author

@oiooj oiooj commented Jul 10, 2019

Why is the proxy returning status 500 for this path? That seems like the bug to fix.

@bcmills Thanks, The goproxy.io built before CL173441, and it breaks user's go get in go1.13beata1, I will fix the proxy server.

@oiooj oiooj closed this Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.