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

x/build/cmd/coordinator: merge double error returns into one error #34246

bradfitz opened this issue Sep 11, 2019 · 0 comments


Copy link

commented Sep 11, 2019

Many parts of x/build return two errors, the "remote error" vs the "exec error". The first represents a command that executed remotely (but failed), and the latter is an error trying to even do the execution, and didn't even making to finding out the remote buildlet's exit status.

In the x/build these go by several names (rerr, err, network error, communication error) etc.

But the code gets ugly dealing with and propagating the two types of errors and I suspect not many points in the code care (retries, etc).

Now that Go 1.13 errors are a bit more mature ( it's probably time to clean up x/bulid's errors and collapse all the double error returns back into one, where the "it was a failure to communicate" bit (or alternatively, perhaps easier: "the successfully failed" bit) are just a property on the error that we can ask about questions about when a caller cares.

/cc @dmitshur (who I can tell from his recent CLs has been hating this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.