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

Open
bradfitz opened this issue Sep 11, 2019 · 0 comments
Open

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

bradfitz opened this issue Sep 11, 2019 · 0 comments
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

Comments

@bradfitz
Copy link
Contributor

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)

@gopherbot gopherbot added this to the Unreleased milestone Sep 11, 2019
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Sep 11, 2019
@dmitshur dmitshur self-assigned this Sep 11, 2019
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

4 participants