Allow exceptions that fail pickle deserialisation to be easily identified downstream.#8882
Open
Allow exceptions that fail pickle deserialisation to be easily identified downstream.#8882
Conversation
added 2 commits
October 4, 2024 13:16
… that fail deserialisation to be easily identified downstream.
Collaborator
|
Can one of the admins verify this patch? Admins can comment |
Contributor
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 25 files ± 0 25 suites ±0 10h 27m 19s ⏱️ + 2m 12s For more details on these failures, see this check. Results for commit bfccb53. ± Comparison against base commit 36020d6. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Something we see quite a lot in our production dask (Coiled-powered) setup is exceptions failing to be deserialised when sent from the cluster to the client. This is usually due to either version mismatch or code being present within the cluster software environment that is not there on the client. Obviously this is not an ideal situation and one we're working to resolve.
However, the below change should make it easier to handle this situation in the meantime, as it makes such errors obvious (and able to be easily caught and handled, e.g. by adding a sensible user-facing message) rather than having to catch
Exceptionand fish about for if the first argument is a bytestring that looks like a pickled object.I think this change should be compatible with any existing code that is attempting to do the above. If a breaking change were possible, would be nicer to add a "Unreadable pickled exception received" message to UnreadablePickledException and attach the actual pickled output as a separate field.
Closes #xxxx
pre-commit run --all-files(I hope all the tests will pass on CI, seeing failures locally but I think that's due to not having working IPv6.)