-
Notifications
You must be signed in to change notification settings - Fork 82
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
chore(composer): propagate errors #1838
Conversation
c32105a
to
d179b70
Compare
d179b70
to
0801687
Compare
Left a bunch of comments. This does not seem to be a |
) | ||
.unwrap(); | ||
writeln!(&mut panic_msg, "expected cause:\n\t{expected_err_msg}").unwrap(); | ||
writeln!(&mut panic_msg, "actual cause chain:\n\t{err:?}").unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Debug
log might look funky because debug logs are usually multiple lines, so the first line will have a tab before it, but the subsequent lines will not. A nice crate to do that on every line is https://crates.io/crates/indenter.
But I think the error here is the single-line astria-eyre one? Then in this case my comment likely doesn't matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially, but if for some reason the error is incorrect it could have a longer source chain. I could just remove the indentation, but I'm not sure I dislike the indenting as it is tbh. It'd look similar to how one would write paragraphs normally:
did not find expected executor error message
expected cause:
some expected cause
actual cause chain:
{0: asdfasdlskjdflksdjlalskdjflsalsdkjflasjdfalkdsfj, 1: asflkajsldkfjalksjdflakjsdfkasdjflka
sjdflja, 2: askdjfaksjdfkjasdkfhaksjdfhjksadjfh, 3: some underlying error}
Summary
Propagate errors which occur while composer is starting up and/or running so that the will be returned by the Composer's handle.
Background
Previously, composer would only exit with an error if the collectors' or executor's status channels were closed, and then the error message did not provide detailed information about the error that occurred. Additionally, if either of the
wait_for_*
loops failed, the composer would not shut down gracefully. This change is meant to expose the first eyre report which causes the composer to shut down, and gracefully shut down in all circumstances.Changes
wait_for_ready
loops concurrently, and continue with graceful shutdown even if these fail.Testing
Passing all tests
Changelogs
Changelog updated
Related Issues
closes #1833