You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Composer run_until_stopped() method has two loops which wait on executor and the collectors to be ready before continuing. These checks do a fine job at exiting early if these components fail during startup, but do not propagate the errors which caused the failure. For example, if the chain ID check fails, the following error chain is propagated, not including executor source error chain:
executor failed to become ready
executor failed while waiting for it to become ready
channel closed
We should find a way to propagate these startup errors such that they will end up in the error chain in the composer JoinHandle.
## 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
- Started collector and executor `wait_for_ready` loops concurrently,
and continue with graceful shutdown even if these fail.
- Store the first error composer encounters, and return it after
graceful shutdown. If waiting for collectors or executor fails, Composer
continues so that it can ascertain the underlying error from the task
which caused it.
## Testing
Passing all tests
## Changelogs
Changelog updated
## Related Issues
closes#1833
Currently, the Composer
run_until_stopped()
method has two loops which wait on executor and the collectors to be ready before continuing. These checks do a fine job at exiting early if these components fail during startup, but do not propagate the errors which caused the failure. For example, if the chain ID check fails, the following error chain is propagated, not including executor source error chain:We should find a way to propagate these startup errors such that they will end up in the error chain in the composer
JoinHandle
.Relevant Code:
astria/crates/astria-composer/src/composer.rs
Lines 261 to 267 in e67fdb9
┆Issue Number: ENG-1026
The text was updated successfully, but these errors were encountered: