update easyblocks for toy extensions to make sure that asynchronous installation command is run in correct working directory #4471
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.
Fixes flaky test failures in
test_toy_exts_parallel
, which are blocking #4469 (and also #4453), because the installation command for the extension is being run from the wrong working directory.Apparently all threads are affected by an
os.chdir
call, which is global state for the whole process, so we can't rely on it.It seems like for newer Python versions this is less of a problem, I've only seen failing tests with Python 3.6-3.8.
edit: https://stackoverflow.com/questions/13438910/if-i-chdir-within-a-thread-will-that-affect-the-cwd-of-the-parent-program/73867506#73867506 is a good source of information on this (hat tip @zao)