x/build/cmd/coordinator: merge double error returns into one error #34246
Labels
Builders
x/build issues (builders, bots, dashboards)
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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 (https://golang.org/doc/go1.13#error_wrapping) 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)
The text was updated successfully, but these errors were encountered: