]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Use uv's venv path
authorZack Cerza <zack@cerza.org>
Thu, 10 Apr 2025 19:22:33 +0000 (13:22 -0600)
committerZack Cerza <zack@cerza.org>
Wed, 2 Jul 2025 02:51:55 +0000 (20:51 -0600)
Signed-off-by: Zack Cerza <zack@cerza.org>
bootstrap
containers/teuthology-dev/teuthology.sh
docs/docker-compose/teuthology/teuthology.sh
teuthology/dispatcher/__init__.py
teuthology/dispatcher/test/test_dispatcher.py
teuthology/repo_utils.py

index 323846efa48076b7fe83544bc14ea85954dcd7f3..5309a89064870d487d023fd3858e3af8b0ebc810 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -85,6 +85,8 @@ fi
 command -v uv > /dev/null || pipx ensurepath
 PATH=$PATH:$HOME/.local/bin
 uv sync --frozen --all-extras
+# To avoid crashing older dispatchers
+ln -sf .venv virtualenv
 
 # Install ansible collections
 uv run ansible-galaxy install -r requirements.yml
index 373f6efb8bf64c64260aaf0ff16e36d8f561d47e..49219d20556c6e3e6cf6a6c52b44f2970d019cb4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/bash
 set -e
-source /teuthology/virtualenv/bin/activate
+PATH=$PATH:/teuthology/.venv/bin
 set -x
 cat /run/secrets/id_rsa > $HOME/.ssh/id_rsa
 if [ -n "$TEUTHOLOGY_TESTNODES" ]; then
index 78770e323cb43e70d33ba91548ccc3e49ea77cc0..c9ed897e23e90f936d07faef7928c655ab88339d 100755 (executable)
@@ -4,7 +4,7 @@ set -e
 if [ -n "$SSH_PRIVKEY_FILE" ]; then
     echo "$SSH_PRIVKEY" > $HOME/.ssh/$SSH_PRIVKEY_FILE
 fi
-source /teuthology/virtualenv/bin/activate
+PATH=$PATH:/teuthology/.venv/bin
 set -x
 if [ -n "$TESTNODES" ]; then
     for node in $(echo $TESTNODES | tr , ' '); do
index 59f8ae3279d8e27509e2322d6cc32c0ea8bf6815..f64246f2a303c1ef0d8a3d24c11bf136d51933fb 100644 (file)
@@ -304,7 +304,7 @@ def prep_job(job_config, log_file_path, archive_dir):
         )
         raise SkipJob()
 
-    teuth_bin_path = os.path.join(teuth_path, 'virtualenv', 'bin')
+    teuth_bin_path = os.path.join(teuth_path, '.venv', 'bin')
     if not os.path.isdir(teuth_bin_path):
         raise RuntimeError("teuthology branch %s at %s not bootstrapped!" %
                            (teuthology_branch, teuth_bin_path))
index 58f58cf9cf1f970997744c2cfbdc0cbbcefe12f0..4b15e35376ea36110d02c6fc02e1252c4036e744 100644 (file)
@@ -71,7 +71,7 @@ class TestDispatcher(object):
         )
         assert got_config['teuthology_branch'] == 'main'
         m_fetch_teuthology.assert_called_once_with(branch='main', commit='teuth_hash')
-        assert teuth_bin_path == '/teuth/path/virtualenv/bin'
+        assert teuth_bin_path == '/teuth/path/.venv/bin'
         m_fetch_qa_suite.assert_called_once_with('main', 'suite_hash')
         assert got_config['suite_path'] == '/suite/path'
 
index 79fd92edaa20456741524318bc4fb11d9212de40..6d135b469b754d42103c8e6706e5157ca35ddfb7 100644 (file)
@@ -462,7 +462,7 @@ def bootstrap_teuthology(dest_path):
         if returncode != 0:
             for line in out.split("\n"):
                 log.warning(line.strip())
-            venv_path = os.path.join(dest_path, 'virtualenv')
+            venv_path = os.path.join(dest_path, '.venv')
             log.info("Removing %s", venv_path)
             shutil.rmtree(venv_path, ignore_errors=True)
             raise BootstrapError("Bootstrap failed!")