From 9a1be7794bd3b1b06a89183a800f42f77cd1b1b9 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Thu, 8 Dec 2022 20:24:46 -0600 Subject: [PATCH] Pin tox<4.0.0 for <=stable/zed branch testing Tox 4.0.0 has some incompatible changes, epecially more strict on allowlist_externals. Tempest recently changed allowlist_externals not to be *[1] causing the failure on jobs where lib/tempest failing to run the tempest as command in virtual env. ---------- venv: commands[0]> tempest verify-config -uro /tmp/tmp.qH5KgJHTF4 venv: failed with tempest is not allowed, use allowlist_externals to allow it ------ We do not need to test/fix the <=stable/zed branches with tox 4.0.0 and pinning them with the compatible tox version of the time stable brnaches were releaased is better way. This commit proposes: 1. Pinning the tox<4.0.0 for <=stable/ze branches testing 2. Workaround to unblock the master gate by pinning it <4.0.0 but we should make our testing compatible with tox 4.0.0 soon. Depends-On: https://review.opendev.org/c/openstack/devstack/+/867066 Related-Bug: #1999183 [1] https://review.opendev.org/c/openstack/tempest/+/865314 devstack based job started failing to run tempest command on venv. Change-Id: I9a138af94dedc0d8ce5a0d519d75779415d3c30b --- lib/tempest | 7 ++++++- playbooks/tox/pre.yaml | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/tempest b/lib/tempest index b232f24540..ec2949ac38 100644 --- a/lib/tempest +++ b/lib/tempest @@ -779,7 +779,12 @@ function configure_tempest { # install_tempest() - Collect source and prepare function install_tempest { git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH - pip_install 'tox!=2.8.0' + # NOTE(gmann): Pinning tox<4.0.0 for stable/zed and lower. Tox 4.0.0 + # released after zed was released and has some incompatible changes + # and it is ok not to fix the issues caused by tox 4.0.0 in stable + # beanches jobs. We can continue testing the stable/zed and lower + # branches with tox<4.0.0 + pip_install 'tox!=2.8.0,<4.0.0' pushd $TEMPEST_DIR # NOTE(gmann): checkout the TEMPEST_BRANCH in case TEMPEST_BRANCH # is tag name not master. git_clone would not checkout tag because diff --git a/playbooks/tox/pre.yaml b/playbooks/tox/pre.yaml index d7e4670a80..68d5254251 100644 --- a/playbooks/tox/pre.yaml +++ b/playbooks/tox/pre.yaml @@ -5,4 +5,10 @@ bindep_profile: test bindep_dir: "{{ zuul_work_dir }}" - test-setup - - ensure-tox + # NOTE(gmann): Pinning tox<4.0.0 for stable/zed and lower. Tox 4.0.0 + # released after zed was released and has some incompatible changes + # and it is ok not to fix the issues caused by tox 4.0.0 in stable + # beanches jobs. We can continue testing the stable/zed and lower + # branches with tox<4.0.0 + - role: ensure-tox + ensure_tox_version: "<4"