Skip to content

Clarify scheduler unpickling in protocol docs - #9286

Merged
crusaderky merged 1 commit into
dask:mainfrom
peter941221:docs/issue-9283-protocol-unpickle
Jun 5, 2026
Merged

crusaderky merged 1 commit into
dask:mainfrom
peter941221:docs/issue-9283-protocol-unpickle

Conversation

@peter941221

Copy link
Copy Markdown
Contributor

Closes #9283.

  1. protocol.rst said the scheduler kept pickled functions as bytes and was protected from unsafe unpickling.

  2. That did not match the current implementation. ToPickle says the scheduler unpickles on arrival, distributed.protocol.core.loads() unpickles __Pickled__ frames, and the client uses ToPickle for control-plane fields such as code, annotations, and span_metadata.

  3. This patch narrows the claim. The docs now explain that the scheduler can forward Serialized task payloads without deserializing them when decoding with deserialize=False, but it still unpickles ToPickle control-plane fields.

  4. The updated text also makes the trust boundary explicit and points readers at distributed.comm.require-encryption for TLS.

@github-actions

github-actions Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Results

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

    40 files  +    1      40 suites  +1   14h 17m 56s ⏱️ + 9m 16s
 4 152 tests ±    0   3 972 ✅ ±    0    179 💤 ± 0  1 ❌ ±0 
80 801 runs  +1 401  76 565 ✅ +1 363  4 235 💤 +38  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 7cf6f7e. ± Comparison against base commit ac18195.

♻️ This comment has been updated with latest results.

@peter941221
peter941221 marked this pull request as ready for review June 4, 2026 22:59
@peter941221
peter941221 requested a review from fjetter as a code owner June 4, 2026 22:59
@peter941221
peter941221 force-pushed the docs/issue-9283-protocol-unpickle branch 2 times, most recently from 60c0a81 to 57d198d Compare June 5, 2026 01:54
@peter941221
peter941221 force-pushed the docs/issue-9283-protocol-unpickle branch from 57d198d to 7cf6f7e Compare June 5, 2026 02:36
@crusaderky

Copy link
Copy Markdown
Collaborator

Thank you!

@crusaderky
crusaderky merged commit daff1c6 into dask:main Jun 5, 2026
48 of 51 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.

Docs: protocol.rst overstates scheduler unpickling protection (contradicts ToPickle docstring)

2 participants