Cache execnet gateway rinfo during WorkerController setup#1072
Merged
bluetech merged 1 commit intopytest-dev:masterfrom Apr 28, 2024
Merged
Cache execnet gateway rinfo during WorkerController setup#1072bluetech merged 1 commit intopytest-dev:masterfrom
bluetech merged 1 commit intopytest-dev:masterfrom
Conversation
Member
|
This change LGTM, pending pytest-dev/execnet#274 (comment) (and if we decide to fix in xdist instead of execnet, should update the "Remove this after execnet is fixed" comment) |
80f9254 to
0a7755d
Compare
zmedico
commented
Apr 27, 2024
| # accesses rinfo while the main thread is busy executing our | ||
| # remote_exec call, which triggers a deadlock error for the | ||
| # main_thread_only execmodel if the rinfo has not been cached. | ||
| self.gateway._rinfo() |
Contributor
Author
There was a problem hiding this comment.
This change LGTM, pending pytest-dev/execnet#274 (comment) (and if we decide to fix in xdist instead of execnet, should update the "Remove this after execnet is fixed" comment)
Okay, comment updated. Noted the change here: #1071 (comment)
bluetech
approved these changes
Apr 27, 2024
Member
bluetech
left a comment
There was a problem hiding this comment.
Thanks!
If there are no further comments, I'll merge this and release 3.6.1.
nicoddemus
approved these changes
Apr 28, 2024
Cache execnet gateway info during WorkerController setup for backward compatibility, in order to avoid a later main_thread_only deadlock error triggered when pytest-cov calls rinfo after the main thread is already busy. See pytest-dev/execnet#274 for corresponding test case. Fixes: 20e3ac7 ("Use execnet main_thread_only execmodel (pytest-dev#1027)")
0a7755d to
12b3cce
Compare
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.
Cache execnet gateway info during WorkerController setup for backward
compatibility, in order to avoid a later main_thread_only deadlock
error triggered when pytest-cov calls rinfo after the main thread is
already busy. See pytest-dev/execnet#274 for corresponding test case.
Fixes: 20e3ac7 ("Use execnet main_thread_only execmodel (#1027)")
I was able not able to reproduce the issue using a small project with pytest-xdist and pytest-cov.
I was able to reproduce it by running tox in a checkout of setuptools, after using pip to install pytest-xdist-3.6.0 into the .tox/py virtualenv. Then I applied this PR to the virtualenv and that fixed the issue, with pytest-cov successfully producing coverage results.