Skip to content
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

Allow exceptions that fail pickle deserialisation to be easily identified downstream. #8882

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

timw6n
Copy link

@timw6n timw6n commented Oct 4, 2024

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 Exception and 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

  • Tests added / passed
  • Passes 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.)

@timw6n timw6n requested a review from fjetter as a code owner October 4, 2024 12:50
@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

Admins can comment ok to test to allow this one PR to run or add to allowlist to allow all future PRs from the same author to run.

Copy link
Contributor

github-actions bot commented Oct 4, 2024

Unit Test Results

See 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
 4 130 tests + 1   4 015 ✅ ± 0    110 💤 ±0  5 ❌ +1 
47 710 runs  +12  45 608 ✅ +12  2 097 💤 +1  5 ❌  - 1 

For more details on these failures, see this check.

Results for commit bfccb53. ± Comparison against base commit 36020d6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants