Skip to content

Improve error when submitting work from a closed client #9049

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

jrbourbeau
Copy link
Member

Today if someone accidentally does client.submit or client.map with a closed client, they get a huge, not super meaningful error:

Exception: Tried sending message after closing.  Status: closed
Message: {'op': 'update-graph', 'graph_header': {'serializer': 'pickle', 'writeable': ()}, 'graph_frames': 
[b'\x80\x05\x95\x9bJ\x00\x00\x00\x00\x00\x00\x8c\x1edistributed.protocol.serialize\x94\x8c\x08ToPickle\x94\x93\x94)\x81\x94}\x94\x8c\x04data\x94\x8c\x13
dask.highlevelgraph\x94\x8c\x0eHighLevelGraph............... # this bytestring goes on for a long time

This PR update the error in this case to be more concise:

ClosedClientError: Client is closed. Can't send update-graph message.

@jrbourbeau jrbourbeau requested a review from fjetter as a code owner April 17, 2025 18:01
Copy link
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    27 files  ± 0      27 suites  ±0   11h 9m 46s ⏱️ - 4m 14s
 4 102 tests + 1   3 985 ✅ + 1    112 💤 ±0  5 ❌ +1 
51 426 runs  +12  49 120 ✅ +13  2 297 💤 ±0  9 ❌ ±0 

For more details on these failures, see this check.

Results for commit 9dfd158. ± Comparison against base commit 3f17ddb.

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice improvement! CI failures appear unrelated.

@jacobtomlinson jacobtomlinson merged commit 1b27d2e into dask:main Apr 22, 2025
25 of 34 checks passed
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