-
Notifications
You must be signed in to change notification settings - Fork 412
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
feat: improve scraper startup error handling #5191
base: main
Are you sure you want to change the base?
Conversation
- set chain metrics if scraper fails for chain during startup
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5191 +/- ##
=======================================
Coverage 77.53% 77.53%
=======================================
Files 103 103
Lines 2110 2110
Branches 190 190
=======================================
Hits 1636 1636
Misses 453 453
Partials 21 21
|
.set_critical_error(scraper.domain.name(), true); | ||
continue; | ||
} | ||
} | ||
} | ||
if let Err(err) = try_join_all(tasks).await { |
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.
I have a concern regarding possible situation when we have scraper tasks running for a domain while getting ChainConf
and MetricsUpdater
fails. We shall have a scraper running without proper observability.
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.
So would you recommend rearranging the order like so?
build chain_conf
build metrics_updater
build scraper task
Description
Drive-by changes
ScraperDb
mock
feature is enabledRelated issues
Fixes https://github.com/hyperlane-xyz/issues/issues/1408
Backward compatibility
Yes
Testing
Added unittest to test function. But don't have tests in place for testing the logic in
Scraper::run()