Files
Eduardo OlivaresandClaude Opus 4.8 911dc91ed4 Fix plugin-sanity-check venv collision with PEP 832 .venv redirect
virtualenv >= 21.12.0 implements the provisional PEP 832 feature that, when
an environment is created, drops a ".venv" redirect file in the nearest
parent directory holding a pyproject.toml (and without a .venv yet). The
tempest repository root holds a pyproject.toml, so when tox builds the
plugin-sanity-check environment a ".venv" text file is written there,
pointing at ".tox/plugin-sanity-check".

prepare_workspace() in tools/tempest-plugin-sanity.sh then runs
"python3 -m venv .venv" without removing a pre-existing .venv. Python's
stdlib venv refuses to create an environment over an existing non-directory
and fails with "Unable to create directory", breaking the job on the first
plugin. This has been failing every change since 2026-09-24 (virtualenv
21.12.0 release) and still reproduces with virtualenv 21.14.5.

Create the sanity virtualenv in a ".virtualenv" directory instead, so it no
longer collides with the PEP 832 redirect, and point with_venv.sh (used
only by this script) at it. The redirect file is left untouched. The new
directory is also added to the .gitignore and flake8 exclude lists.

Closes-Bug: #2169582
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Change-Id: I9082a7c366ec4986f586fc7cf21371bcf98c53f0
Signed-off-by: Eduardo Olivares <eolivare@redhat.com>
2026-10-05 19:14:38 +02:00

39 lines
767 B
Plaintext

# Don't add patterns to exclude files created by preferred personal tools
# (editors, IDEs, your operating system itself even). These should instead be
# maintained outside the repository, for example in a ~/.gitignore file added
# with:
#
# git config --global core.excludesfile '~/.gitignore'
AUTHORS
ChangeLog
*.pyc
__pycache__/
etc/accounts.yaml
etc/*.conf
etc/tempest.conf.sample
include/swift_objects/swift_small
include/swift_objects/swift_medium
include/swift_objects/swift_large
*.log
*.swp
*.swo
*.egg*
.tox
.venv
.virtualenv
dist
build
.testrepository
.stestr
.idea
.project
.pydevproject
.coverage*
!.coveragerc
cover/
doc/source/_static/tempest.conf.sample
doc/source/plugins/plugin-registry.rst
# Files created by releasenotes build
releasenotes/build