-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: unexpected EOF
error in proxy fetch path lacks error context
#52727
Comments
I think this is coming from the That appears to come from here: The error text is not in line with Effective Go's guidance ”to provide detailed error information”, but it almost certainly cannot be changed now, so we need to wrap the error on the caller side. |
Change https://go.dev/cl/406675 mentions this issue: |
They are indeed, although they have context now. (The |
Change https://go.dev/cl/461682 mentions this issue: |
path.Join collapses duplicated '/' tokens, but an HTTP URL intentionally includes a '://' after the scheme. This should fix the syntax of the errors seen in https://build.golang.org/log/a17d0c7b6159ea4dad0a9e5378ab5a36ee30ce44. Updates #52727. Change-Id: I6e1773a7eb8b3e7e2b3ca29540c1e94a7cd2d99d Reviewed-on: https://go-review.googlesource.com/c/go/+/461682 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Bryan Mills <[email protected]> Auto-Submit: Bryan Mills <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
Change https://go.dev/cl/532015 mentions this issue: |
Change https://go.dev/cl/532035 mentions this issue: |
CL 406675 added more detail to bare errors from net/http in two places. CL 461682 improved one of the two places to stop folding "//" into "/". This CL applies the same change to the other place. For #52727. Change-Id: I3fc13f30cf0f054949ce78269c52b7fafd477e70 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/532015 Reviewed-by: Bryan Mills <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
CL 233437 added a redactedURL field to proxyRepo, a struct that already had a field named 'url'. Neither fields were documented, so the similar names suggest the most natural interpretation that proxyRepo.redactedURL is equivalent to proxyRepo.url.Redacted() rather than something else. That's possibly why it was joined with the module version in CL 406675. It turns out the two URLs differ in more than just redaction: one is the base proxy URL with (escaped) module path joined, the other is just the base proxy URL, in redacted form. Document and rename the fields to make the distinction more clear, and include all 3 of base module proxy URL + module path + module version in the reported URL, rather than just the first and third bits as seen in the errors at https://go.dev/issue/51323#issuecomment-1735812250. For #51323. Updates #38680. Updates #52727. Change-Id: Ib4b134b548adeec826ee88fe51a2cf580fde0516 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/532035 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
This may well be a bug in the
proxy.golang.org
server, but without more detail from the error message we don't have a good way to track it down. Step one is to improve the error message to describe exactly which URL produced theunexpected EOF
error.The text was updated successfully, but these errors were encountered: