update easyblocks for toy extensions to make sure that asynchronous installation command is run in correct working directory#4471
Merged
branfosj merged 2 commits intoeasybuilders:5.0.xfrom Mar 2, 2024
Conversation
…nstallation command is run in correct working directory
ocaisa
approved these changes
Mar 1, 2024
…nto run_async_test_fix_workdir
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.
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.chdircall, 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.
Details
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)