-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
virtualenv fails sometimes when run concurrently #1824
Comments
This feels like is file lock bug, in particular, the use case described by tox-dev/filelock#27 (comment) PS. This is not the case. |
Ok, so got to the bottom of this. Seems we're deleting the application data cache folder when --clear is passed, due to the following subtlety: from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("--clear", action="store_true", default=False)
parser.add_argument("--clear-app-data", action="store_true", default=False)
opts = parser.parse_args(["--clear"])
print(opts)
# prints Namespace(clear=True, clear_app_data=False) however: from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("--clear-app-data", action="store_true", default=False)
opts = parser.parse_args(["--clear"])
print(opts)
# prints Namespace(clear_app_data=True) 😲😲😲😲😲🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️ |
This now has been released via https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-21-2020-05-20 |
Issue
Sometimes our CI builds fail when creating virtualenv. We've tracked the problem to builds running in parallel, trying to create a virtualenv in different directories at the same time.
Able to reproduce it with a simple test:
rm -rf *; parallel python3.7 -m virtualenv ::: $(seq 10)
WARNING: run in a scratch directory (note
rm -rf *
).Most of the times the test passes, but sometimes it fails with errors like these:
Environment
Provide at least:
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
See above
The text was updated successfully, but these errors were encountered: