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

Fix code capture inside pytest-xdist #8221

Merged
merged 1 commit into from Sep 29, 2023
Merged

Conversation

crusaderky
Copy link
Collaborator

@crusaderky crusaderky commented Sep 28, 2023

Fix breakage in coiled/benchmarks caused by #8198.

This is due to a regression that causes a crash whenever you run a Client with code capture enabled from a unit test using pytest-xdist (which in turn is based on execnet)

/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/distributed/client.py:3163: in _graph_to_futures
    computations = self._get_computation_code(
[...]
>               module_name = sys.modules[fr.f_back.f_globals["__name__"]].__name__  # type: ignore
E               KeyError: '__channelexec__'

I manually tested this in coiled/benchmarks.
No unit test included as it's impossible to test without execnet and I'm uneager to add it to the environment just for this.

Output of coiled/benchmarks on the Coiled dashboard:
image

@crusaderky crusaderky self-assigned this Sep 28, 2023
@github-actions
Copy link
Contributor

Unit Test Results

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

       21 files  ±  0         21 suites  ±0   11h 27m 31s ⏱️ + 25m 4s
  3 815 tests ±  0    3 694 ✔️  - 8     107 💤 ±0  14 +8 
36 875 runs  +12  35 059 ✔️ +8  1 799 💤  - 5  17 +9 

For more details on these failures, see this check.

Results for commit ff69696. ± Comparison against base commit a74f7cf.

crusaderky added a commit to coiled/benchmarks that referenced this pull request Sep 28, 2023
@crusaderky crusaderky merged commit 155507d into dask:main Sep 29, 2023
17 of 29 checks passed
@crusaderky crusaderky deleted the execnet branch September 29, 2023 11:03
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.

None yet

2 participants