-
Notifications
You must be signed in to change notification settings - Fork 8
fix: Handle errors from event stream callbacks #1302
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1302 +/- ##
==========================================
+ Coverage 94.99% 95.00% +0.01%
==========================================
Files 42 42
Lines 2755 2763 +8
==========================================
+ Hits 2617 2625 +8
Misses 138 138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6eda306 to
73206be
Compare
|
The main symptom of this was that if a scan failed due to eg a stomp connection error, even if it reconnected, any subsequent scans would fail as the |
73206be to
67c37d1
Compare
abbiemery
left a comment
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.
Demo'd in person
|
As it stands this will continue a scan running, even if rabbitmq is down. So we will loose data from the nexus file. Looking instead at a different way to get the errors to shut things down correctly. |
67c37d1 to
deed376
Compare
If a callback raises an exception, it shouldn't prevent other callbacks receiving the same event. It should also not raise the exception at the call site that published the event.
deed376 to
7d6cd80
Compare
If a callback raises an exception, it shouldn't prevent other callbacks
receiving the same event. Instead, catch any exceptions and re-raise
them after all callbacks have been called as a single ExceptionGroup.
This allows the task to be aborted if any of the callbacks fail but
still allows callbacks that require the "plan failed" events to run.