]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Merge pull request #1753 from ceph/dc-venv
authorZack Cerza <zack@redhat.com>
Tue, 31 May 2022 19:19:09 +0000 (13:19 -0600)
committerGitHub <noreply@github.com>
Tue, 31 May 2022 19:19:09 +0000 (13:19 -0600)
1  2 
bootstrap
docs/docker-compose/teuthology/teuthology.sh
teuthology/repo_utils.py
teuthology/suite/run.py

diff --cc bootstrap
index 5aa9fd834acc8a85712c1dd43418411efafe578d,24729e25d16fc51e6c2eeeb3dfb16741f232c63c..91af9bdb4cfb62e8e4b8d3fdaebb816cf3315cd2
+++ b/bootstrap
  export LC_ALL=en_US.UTF-8
  
  if [ -z "$NO_CLOBBER" ] || [ ! -e ./$VENV ]; then
-     if ! virtualenv --version &>/dev/null; then
-         pip install virtualenv
-     fi
-     virtualenv --python=$PYTHON $VENV
+     python3 -m venv $VENV
  fi
  
 +./$VENV/bin/pip install packaging
 +
 +# It is impossible to upgrade ansible from 2.9 to 2.10 via pip.
 +# See https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.10.html#known-issues
 +if [ -f "$VENV/bin/ansible" ]; then
 +    ansible_version=$($VENV/bin/pip list --format json | python3 -c "import sys; import json; print(list(filter(lambda i: i['name'] == 'ansible', json.loads(sys.stdin.read())))[0]['version'])")
 +    uninstall_ansible=$(./$VENV/bin/python3 -c "from packaging.version import parse; print(parse('$ansible_version') < parse('2.10.0'))")
 +    if [ "$uninstall_ansible" = "True" ]; then
 +        ./$VENV/bin/pip uninstall -y ansible
 +    fi
 +fi
 +
  # First, upgrade pip
  ./$VENV/bin/pip install --upgrade pip
  
index 54fdbe8203473eb1ecd3ea3e31b710976bddb31e,b4e6c9224e905ad32f973d9664addebbd22ed5b9..85029b975ba4fa0dafe9e07d26a49dfa0cec4e7e
@@@ -18,10 -16,10 +16,10 @@@ f
  export MACHINE_TYPE=${MACHINE_TYPE:-testnode}
  if [ -z "$TEUTHOLOGY_WAIT" ]; then
      teuthology-suite -v \
-         --teuthology-branch $TEUTHOLOGY_BRANCH \
+         --teuthology-branch $TEUTH_BRANCH \
          --ceph-repo https://github.com/ceph/ceph.git \
          --suite-repo https://github.com/ceph/ceph.git \
 -        -c master \
 +        -c main \
          -m $MACHINE_TYPE \
          --limit 1 \
          -n 100 \
Simple merge
index a99e0d271087a4a0490e7ced2074bcf079992c0c,e680c531402fab2137cbaace452b1f0c826af142..7ae4a37646f8841f6d21c6ddb92aa89d792d2349
@@@ -245,12 -246,25 +247,25 @@@ class Run(object)
                          log.warning(
                              'The teuthology branch config is empty, skipping')
          if not teuthology_branch:
 -            teuthology_branch = config.get('teuthology_branch', 'master')
 +            teuthology_branch = config.get('teuthology_branch', 'main')
  
-         teuthology_sha1 = util.git_ls_remote(
-             'teuthology',
-             teuthology_branch
-         )
+         if config.teuthology_path is None:
+             teuthology_sha1 = util.git_ls_remote(
+                 'teuthology',
+                 teuthology_branch
+             )
+         else:
+             actual_branch = repo_utils.current_branch(config.teuthology_path)
+             if actual_branch != teuthology_branch:
+                 raise BranchMismatchError(
+                     teuthology_branch,
+                     config.teuthology_path,
+                     "config.teuthology_path is set",
+                 )
+             teuthology_sha1 = util.git_ls_remote(
+                 f"file://{config.teuthology_path}",
+                 teuthology_branch
+             )
          if not teuthology_sha1:
              exc = BranchNotFoundError(teuthology_branch, build_git_url('teuthology'))
              util.schedule_fail(message=str(exc), name=self.name)