Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion chromadb/test/utils/cross_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
from types import ModuleType
from typing import Dict, List

base_install_dir = tempfile.gettempdir() + "/persistence_test_chromadb_versions"
base_install_dir = (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prior to this change, base_install_dir ended up being the same value for all workers spawned by pytest-xdist (which I would not expect), leading to the workers clobbering each other during installs

tempfile.gettempdir()
+ f"/worker-{os.environ.get('PYTEST_XDIST_WORKER', 'unknown')}"
+ "/persistence_test_chromadb_versions"
)


def get_path_to_version_install(version: str) -> str:
sys.stderr.write(f"path for worker {base_install_dir}\n")
return base_install_dir + "/" + version


Expand Down Expand Up @@ -48,6 +53,8 @@ def install_version(version: str, dep_overrides: Dict[str, str]) -> None:


def install(pkg: str, path: str, dep_overrides: Dict[str, str]) -> int:
os.makedirs(path, exist_ok=True)

# -q -q to suppress pip output to ERROR level
# https://pip.pypa.io/en/stable/cli/pip/#quiet
command = [sys.executable, "-m", "pip", "-q", "-q", "install", pkg]
Expand Down
Loading