Skip to content

[unsupervised AI] fix: propagate task annotations during worker execution - #9340

Draft
rohitsalla wants to merge 2 commits into
dask:mainfrom
rohitsalla:fix/propagate-task-annotations
Draft

[unsupervised AI] fix: propagate task annotations during worker execution#9340
rohitsalla wants to merge 2 commits into
dask:mainfrom
rohitsalla:fix/propagate-task-annotations

Conversation

@rohitsalla

@rohitsalla rohitsalla commented Aug 4, 2026

Copy link
Copy Markdown

Fixes #9138

What changed

  • Enter resolved user annotation context while worker user code executes, instead of propagating only the span annotation.
  • Keep scheduler and execution controls such as worker restrictions, resources, retries, and executor selection scoped to the parent task.
  • Add regression coverage for nested synchronous and asynchronous delayed computations, sequential spans, and control-annotation isolation.

This lets nested distributed computations inherit user annotations without accidentally constraining child scheduling to the parent task.

Verification

  • .venv/bin/python -m pytest -q distributed/tests/test_worker_client.py distributed/tests/test_spans.py
    • 51 passed, 1 skipped (optional pandas dependency), 1 xpassed
  • .venv/bin/python -m pytest -q distributed/tests/test_actor.py::test_serialize_with_pickle
    • 1 passed
  • .venv/bin/python -m pytest -q -o addopts='' -W default::pytest.PytestUnknownMarkWarning distributed/tests/test_client.py::test_secede_balances distributed/tests/test_worker.py::test_get_client
    • 2 passed; local environment lacks the optional flaky-marker plugin
  • .venv/bin/python -m ruff check distributed/worker.py distributed/tests/test_worker_client.py
  • .venv/bin/python -m ruff format --check distributed/worker.py distributed/tests/test_worker_client.py
  • git diff --check

@github-actions

github-actions Bot commented Aug 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  ± 0      40 suites  ±0   14h 45m 0s ⏱️ - 10m 9s
 4 160 tests + 1   3 979 ✅  -  1    178 💤 ±0  3 ❌ +2 
80 960 runs  +21  76 719 ✅ +17  4 238 💤 +2  3 ❌ +2 

For more details on these failures, see this check.

Results for commit 696800c. ± Comparison against base commit 40fcd99.

♻️ This comment has been updated with latest results.

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.

spans and annotations lost across copute() boundaries

1 participant