Repository navigation
Preserve exception fields through worker fallback reconstruction - #462
Open
mayankdhingra02 wants to merge 1 commit into
Open
mayankdhingra02 wants to merge 1 commit into
mayankdhingra02 wants to merge 1 commit into
Conversation
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.
Summary
A worker rebuilds an exception as
type(error)(*error.args)when incidental state prevents pickling. Several Wool exceptions currently put a formatted message inargs, so reconstruction changes their class, loses typed fields, or formats the message twice. Store their structured constructor fields inargsand render messages with__str__.Closes #439.
Proposed changes
ChainContention, RPC errors, serialization errors and their warning collections,Rejected, andProtobufImportErrorthrough direct reconstruction, pickle and worker frames. Keep local task identities available while putting stable diagnostic representations on the wire. Retain the old contention reconstruction function so existing pickles still load.RuntimeErrordemotion.str(error)for the rendered message.SerializationErrornow accepts one message pluscauseandvalue_repr, replacing arbitrary positional message arguments.Test cases
args, pickle, or a worker frameValidation on Python 3.13.3 / macOS:
pytest -m 'not integration' --cov-fail-under=98 -q— 2,851 passed, 1 skipped, 2 expected failures; 98.30% coverage.pytest -m integration --cov-fail-under=70 -q— 422 passed, 1 expected failure; 84.76% coverage.The Linux / Python 3.11–3.13 CI matrix has not run locally.