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
Ensure log_event of non-msgpack serializable object do not kill servers #7472
Conversation
Stumbled over #7473 |
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 26 files + 22 26 suites +22 15h 37m 17s ⏱️ + 14h 25m 23s For more details on these failures, see this check. Results for commit 4b5d7c4. ± Comparison against base commit 2ab8cbd. ♻️ This comment has been updated with latest results. |
1038460
to
87ff8f6
Compare
43503fa
to
657264c
Compare
this change means that log_event can no longer handle
|
ce1dcee
to
0f9f62a
Compare
Is this one ready for review? |
@hendrikmakait yep, it's ready for review thanks! |
@@ -7818,6 +7818,20 @@ async def get_worker_logs(self, n=None, workers=None, nanny=False): | |||
return results | |||
|
|||
def log_event(self, topic: str | Collection[str], msg: Any) -> None: | |||
"""Log an event under a given topic |
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.
Do we need to test this as well?
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.
It's tested indirectly by test_nanny.py::test_log_event because it calls the scheduler log_event
I'm happy to add a more direct test if you think it's needed
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'd appreciate an explicit test, that would make it easier to narrow down where things break.
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.
@hendrikmakait there's already a test that calls this: test_configurable_events_log_length
and the only way a user should be calling the scheduler.log_event is via RPC which will have already checked if the message _is_dumpable so it doesn't need to be checked again
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.
Thanks for clarifying!
…rs (dask#7472) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Closes #7471
For the purposes this log system is intended for, I believe sticking to msgpack serializable objects is a good choice. There are cases where this could be surprising (as in #7471 where a numpy scalar is encountered) but I believe raising properly w/out killing the worker is a decent compromise
I copied the doc strings from
Client.log_event