From 7c6503aba07f359f8ba023f2cceb7c06bb0829d0 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 12 Feb 2020 08:43:38 -0800 Subject: [PATCH] Simplify virtualenv install and execution virtualenv==20.0.0 introduced new symlinking of "seed" packages that broke within a bwrap context. We fixed this by forcing those seed packages to be installed by pip avoiding any symlinking. Since then upstream virtualenv has realize this was bad default behavior and virtualenv==20.0.2 does not symlink by default. Take advantage of this and exclude 20.0.0 and 20.0.1 as they need special handling. This allows other versions (new and old) to function. Change-Id: I3b993e72b52e2234e046a657280b008887c535a3 --- requirements.txt | 4 ++-- zuul/lib/ansible.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 791ab05826..e534f4af85 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ pbr>=1.1.0 -# Newer virtualenv has different behavior and arguments -virtualenv>=20.0.0 +# Early virtualenv 20 had bad file location assumptions +virtualenv!=20.0.0,!=20.0.1 github3.py>=1.1.0 PyYAML>=3.1.0 diff --git a/zuul/lib/ansible.py b/zuul/lib/ansible.py index 66d69e0314..2671c4593b 100644 --- a/zuul/lib/ansible.py +++ b/zuul/lib/ansible.py @@ -94,7 +94,7 @@ class ManagedAnsible: # We don't use directly the venv module here because its behavior is # broken if we're already in a virtual environment. cmd = [sys.executable, '-m', 'virtualenv', - '-p', python_executable, '--seeder=pip', venv_path] + '-p', python_executable, venv_path] p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if p.returncode != 0: