summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorGhanshyam Mann <gmann@ghanshyammann.com>2021-12-20 10:07:49 -0600
committerGhanshyam <gmann@ghanshyammann.com>2022-01-25 17:03:31 +0000
commit5ff5dabd6e6bafde1a68e70f9a6869cee1753850 (patch)
tree52ef20d6d73b67c2eaa0bfe2cebb4947051589d4 /roles
parentd373b9a1762d338f7be2c9dd59e146b81b3799f6 (diff)
downloadtempest-5ff5dabd6e6bafde1a68e70f9a6869cee1753850.tar.gz
Fix stable/train testing with tempest 26.1.0
Tis issue came up before also during we cap the Tempest version for stable branch tests(the one moved to EM state). Tempest use the tox constraints file while creating the tempest virtual env in devstack/lib/tempest, installing the tempest plugins and running the tests like in run-tempest ansible roles. If anywhere tox constraints file is used differently then venv will be recreated and installed tempest plugins will be gone from that recreated venv so tempest will not be able to run the plugins tests and fail job. Current failure: https://aca43ed1a01d95dea0ee-dcdb6cbb330bdac08ffee1284f86c919.ssl.cf2.rackcdn.com/822225/3/check/octavia-v2-dsvm-scenario/f60e4d3/job-output.txt Earlier I tried to fix it in a generic way by fetching the devstack localrc - https://review.opendev.org/c/openstack/tempest/+/774913 but this solution does not seems working as we can see it is skipped in current stable/train testing with tempest 26.1.0 Adding stable/train explicitly in list for using the stable constraint in run-tempest role also which will be in sync with what devstack/lib/tempest use. And later I will debug why generic way is not working. Because of Tempest 26.1.0 and with stestr 2.5.1 (beacause of upper constraints of stestr 2.5.1 in stable/train) which does not have new args exclude-regex so let's fallback to old arg if new arg is passed. Depends-On: https://review.opendev.org/c/openstack/devstack/+/822380 Depends-On: https://review.opendev.org/c/openstack/cinder-tempest-plugin/+/825708 Closes-Bug: #1955418 Change-Id: I105c839c38adfba1f9e22123ec3a99ffc0b5b72e
Diffstat (limited to 'roles')
-rw-r--r--roles/run-tempest/README.rst2
-rw-r--r--roles/run-tempest/tasks/main.yaml28
2 files changed, 27 insertions, 3 deletions
diff --git a/roles/run-tempest/README.rst b/roles/run-tempest/README.rst
index 0c72b69a5..191939385 100644
--- a/roles/run-tempest/README.rst
+++ b/roles/run-tempest/README.rst
@@ -81,7 +81,7 @@ variable (through the `register` statement).
.. zuul:rolevar:: stable_constraints_file
:default: ''
- Upper constraints file to be used for stable branch till stable/stein.
+ Upper constraints file to be used for stable branch till stable/train.
.. zuul:rolevar:: tempest_tox_environment
:default: ''
diff --git a/roles/run-tempest/tasks/main.yaml b/roles/run-tempest/tasks/main.yaml
index a8b3edef2..397de1ee4 100644
--- a/roles/run-tempest/tasks/main.yaml
+++ b/roles/run-tempest/tasks/main.yaml
@@ -25,11 +25,11 @@
target_branch: "{{ zuul.override_checkout }}"
when: zuul.override_checkout is defined
-- name: Use stable branch upper-constraints till stable/stein
+- name: Use stable branch upper-constraints till stable/train
set_fact:
# TOX_CONSTRAINTS_FILE is new name, UPPER_CONSTRAINTS_FILE is old one, best to set both
tempest_tox_environment: "{{ tempest_tox_environment | combine({'UPPER_CONSTRAINTS_FILE': stable_constraints_file}) | combine({'TOX_CONSTRAINTS_FILE': stable_constraints_file}) }}"
- when: target_branch in ["stable/ocata", "stable/pike", "stable/queens", "stable/rocky", "stable/stein"]
+ when: target_branch in ["stable/ocata", "stable/pike", "stable/queens", "stable/rocky", "stable/stein", "stable/train"]
- name: Use Configured upper-constraints for non-master Tempest
set_fact:
@@ -78,6 +78,17 @@
exclude_list_option: "--exclude-list={{ tempest_test_exclude_list|quote }}"
when: exclude_list_stat.stat.exists
+- name: stable/train workaround to fallback exclude-list to blacklist
+ # NOTE(gmann): stable/train use Tempest 26.1.0 and with stestr 2.5.1
+ # (beacause of upper constraints of stestr 2.5.1 in stable/train) which
+ # does not have new args exclude-list so let's fallback to old arg
+ # if new arg is passed.
+ set_fact:
+ exclude_list_option: "--blacklist-file={{ tempest_test_exclude_list|quote }}"
+ when:
+ - tempest_test_exclude_list is defined
+ - target_branch == "stable/train"
+
# TODO(kopecmartin) remove this after all consumers of the role have switched
# to tempest_exclude_regex option, until then it's kept here for the backward
# compatibility
@@ -94,6 +105,19 @@
when:
- tempest_black_regex is not defined
- tempest_exclude_regex is defined
+ - target_branch != "stable/train"
+
+- name: stable/train workaround to fallback exclude-regex to black-regex
+ # NOTE(gmann): stable/train use Tempest 26.1.0 and with stestr 2.5.1
+ # (beacause of upper constraints of stestr 2.5.1 in stable/train) which
+ # does not have new args exclude-regex so let's fallback to old arg
+ # if new arg is passed.
+ set_fact:
+ tempest_test_exclude_regex: "--black-regex={{tempest_exclude_regex|quote}}"
+ when:
+ - tempest_black_regex is not defined
+ - tempest_exclude_regex is defined
+ - target_branch == "stable/train"
- name: Run Tempest
command: tox -e {{tox_envlist}} {{tox_extra_args}} -- {{tempest_test_regex|quote}} \