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
Introduce PreloadManager
to handle failures in preload setup/teardown
#8078
Conversation
@@ -1313,8 +1313,7 @@ async def _start(self, timeout=no_default, **kwargs): | |||
for topic, handler in Client._default_event_handlers.items(): | |||
self.subscribe_topic(topic, handler) | |||
|
|||
for preload in self.preloads: | |||
await preload.start() | |||
await self.preloads.start() |
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.
There's an argument to be made that preload.start
should raise here. Thoughts?
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.
Agreed; I don't think it's healthy to semi-quietly go online nonetheless.
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 21 files + 1 21 suites +1 10h 49m 43s ⏱️ - 29m 17s For more details on these failures, see this check. Results for commit 420ac66. ± Comparison against base commit 9255987. This pull request removes 14 and adds 32 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
PreloadManager
to handle preloads in a canonical way.PreloadManager
to handle failures in preload setup/teardown
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.
LGTM. I suggest to leave the change to crash in case of failing preload start to a separate PR.
Co-authored-by: crusaderky <crusaderky@gmail.com>
This PR introduces a
PreloadManager
which deduplicates preload handling code from theClient
,Nanny
,Scheduler
, andWorker
. ThePreloadManager
also ensures that errors onpreload.{start|teardown}
don't raise.pre-commit run --all-files