diff options
author | Ghanshyam Mann <gmann@ghanshyammann.com> | 2021-04-05 16:55:09 -0500 |
---|---|---|
committer | Radosław Piliszek <radoslaw.piliszek@gmail.com> | 2021-04-11 10:08:18 +0000 |
commit | 2f6e1169ec949ddb39a47165ca4120b5f0039c95 (patch) | |
tree | 39f7d42f743e9045471274dc2da16117189d73e1 | |
parent | ba2ed09ba167fa9b5bd49fb931e77a878cfb7bdb (diff) | |
download | heat-2f6e1169ec949ddb39a47165ca4120b5f0039c95.tar.gz |
Configure the Tempest venv upper constraints properly
We use Tempest master for testing the supported stable
branches, so using master upper constraints works fine for
such master or stable branch testing, but when we need to
use old Tempest in the below cases then master upper constraints
do not work for Tempest venv:
- Testing Extended Maintenance branch
- Testing py2.7 jobs until stable/train with in-tree tempest plugins
If heat integration test script does not use the master constraints
for Tempest (when any stable branch goes to Extended Maintenance state)
then we need to use the same constraints while running the tests too
otherwise, it will end up recreating the Tempest venv and remove the
already installed tempest plugins and their deps.
This commit set the compatible upper constraint
according the stable branch Tempest version.
Closes-Bug: 1922597
Change-Id: Ib33b5688153f07e696a39b26510b22fe128597ea
-rw-r--r-- | .zuul.yaml | 2 | ||||
-rwxr-xr-x | devstack/upgrade/resources.sh | 24 |
2 files changed, 22 insertions, 4 deletions
diff --git a/.zuul.yaml b/.zuul.yaml index e6f8e4d5e..20eb37162 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -82,7 +82,6 @@ - ^heat/tests/.*$ - ^releasenotes/.*$ - ^setup.cfg$ - voting: false vars: configure_swap_size: 8192 topology: aio @@ -95,7 +94,6 @@ roles: - zuul: zuul/zuul-jobs pre-run: playbooks/devstack/multinode-networking/pre.yaml - voting: false vars: topology: multinode diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh index 1b7be42ee..bfa276107 100755 --- a/devstack/upgrade/resources.sh +++ b/devstack/upgrade/resources.sh @@ -55,6 +55,7 @@ EOF function _run_heat_integrationtests { local devstack_dir=$1 + local use_stable_constraints=$2 pushd $devstack_dir/../tempest export DEST=$(dirname $devstack_dir) @@ -65,6 +66,25 @@ function _run_heat_integrationtests { UPGRADE_TESTS=upgrade_tests.list _write_heat_integrationtests $UPGRADE_TESTS + # NOTE(gmann): If devstack is pinned to use the non master + # Tempest and constraints for Tempest venv then use the same + # while running the tests too otherwise, it will recreate + # the Tempest venv due to constraints mismatch. + # recreation of Tempest venv can flush the initially installed + # tempest plugins and their deps. + if [[ $use_stable_constraints == "True" ]]; then + echo "Using $DEST/requirements/upper-constraints.txt constraints in Tempest venv." + # NOTE: setting both tox env var and once Tempest start using new var + # TOX_CONSTRAINTS_FILE then we can remove the old one. + export UPPER_CONSTRAINTS_FILE=$DEST/requirements/upper-constraints.txt + export TOX_CONSTRAINTS_FILE=$UPPER_CONSTRAINTS_FILE + else + echo "Using master constraints in Tempest venv." + # NOTE: setting both tox env var and once Tempest start using new var + # TOX_CONSTRAINTS_FILE then we can remove the old one. + export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master + export TOX_CONSTRAINTS_FILE=$UPPER_CONSTRAINTS_FILE + fi tox -evenv-tempest -- stestr --test-path=$DEST/heat/heat_integrationtests --top-dir=$DEST/heat \ --group_regex='heat_tempest_plugin\.tests\.api\.test_heat_api[._]([^_]+)' \ run --whitelist-file $UPGRADE_TESTS @@ -75,7 +95,7 @@ function _run_heat_integrationtests { function create { if [ "${RUN_HEAT_INTEGRATION_TESTS}" == "True" ]; then # run heat integration tests instead of tempest smoke before create - _run_heat_integrationtests $BASE_DEVSTACK_DIR + _run_heat_integrationtests $BASE_DEVSTACK_DIR "True" fi source $TOP_DIR/openrc admin admin @@ -113,7 +133,7 @@ function verify { local side="$1" if [[ "$side" = "post-upgrade" ]]; then if [ "${RUN_HEAT_INTEGRATION_TESTS}" == "True" ]; then - _run_heat_integrationtests $TARGET_DEVSTACK_DIR + _run_heat_integrationtests $TARGET_DEVSTACK_DIR "False" fi fi stack_name=$(resource_get heat stack_name) |