-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
x/build/cmd/coordinator: improve error message when build fails due to a module not being tidy (and causing failed requests to sum.golang.org) #34356
Comments
The go.sum files are stale. This doesn't have anything to do with it being the first or second test in a run. The firewall is applied before the command execution regardless. |
I've looked, and indeed, the firewall is being restricted very early on, when the However, it is not a problem for fetching modules as I originally thought, those go through the non-restricted internal proxy (i.e., here). But it is a problem if some go.sum files are missing entries and the Go 1.13 command decides to check with the default checksum database at https://sum.golang.org, it will be blocked:
In a way, this is a feature, because it helps find missing go.sum entries. But maybe we should be detecting and reporting that in a more user-friendly way? Or maybe we should be tunneling the checksum database through the module proxy? Moving this to NeedsDecision to figure out how to proceed here. It's certainly not as big of a problem as I originally mistakenly thought. |
It's failing in a pretty readable way, IMO:
But if there's an easy way to detect that and fail with a different message, that's fine too. |
The current error message can be very confusing when one is not familiar with implementation details of x/build (which is most of Go contributors). For a recent example, see https://golang.org/cl/221102. Edit: I should note that the error message can be more confusing when a repository contains more than 1 module. I've retitled this issue to make it more clear we want to improve the error text to be more readable. |
I'm not working on this right now, so unassigning, but we should fix this. |
If you expect the modules to be tidy (or at least complete), it may suffice to set |
That has become the default in Go 1.16 (#40728), so the error message there looks like this:
(From CL 262765.) |
The fix to #32528 was implemented by finding nested modules, and then invoking
go test
once for each one, in sequence.This isn't compatible withGO_DISABLE_OUTBOUND_NETWORK=1
being set and converted to a permanent outbound network restriction as soon as the first set of tests run, because the secondgo test
invocation may need to talk to the module mirror and/or checksum database to fetch/verify additional modules.Edit: More accurately, the network gets restricted early on, before any of the tests run. The network restriction only affects the default checksum database at https://sum.golang.org. The module proxy is not affected because it's treated specially. See #34356 (comment) for more details.
/cc @bradfitz @bcmills
The text was updated successfully, but these errors were encountered: