summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorGhanshyam Mann <gmann@ghanshyammann.com>2023-01-27 14:59:38 -0600
committerRodrigo Barbieri <rodrigo.barbieri@canonical.com>2023-02-21 16:05:09 +0000
commit604111b0ba07a0a55393745c5a0097cd675739cc (patch)
tree2e7875f86d97a85ce8f6ec97c72961b22e4b428d /roles
parent8e2286c9b2d9afb5c1750f2ccf7ec27e8a03e9cf (diff)
downloadheat-604111b0ba07a0a55393745c5a0097cd675739cc.tar.gz
Fix setting the tempest virtual env constraints env var
Heat upgrade script set the env var TOX_CONSTRAINTS_FILE/UPPER_CONSTRAINTS_FILE which are used to use the constraints during Tempest virtual env installation. Those env var are set to non-master constraint when we need to use non-master constraints but when we need to use the master constraints we do not set/reset them point to master constraints. This create the issue when this grenade script install the tempest with stable constraints but with master Tempest and as there is mismatch of constraints now with fasteners of stable branches. Below is failure of heat greande job on stable/yoga - https://zuul.opendev.org/t/openstack/build/3aaec4d59bb84068bb4d4428ea747cbd/log/controller/logs/grenade.sh_log.txt#3245 Similar way, role should set stable constraints only for the stable EM branch not for all otherwise it fail when constraints/requirements are bumped. - https://zuul.opendev.org/t/openstack/build/74f86b8097f44c35acaffdcfe41d9693 We should set/reset those constraint env var to master constraints if configuration tell to use the master constraints. Closes-Bug: #2003993 Change-Id: I024cd134577338fc1075e7742df7f006dc914646
Diffstat (limited to 'roles')
-rw-r--r--roles/run-heat-tests/defaults/main.yaml1
-rw-r--r--roles/run-heat-tests/tasks/main.yaml8
2 files changed, 9 insertions, 0 deletions
diff --git a/roles/run-heat-tests/defaults/main.yaml b/roles/run-heat-tests/defaults/main.yaml
index 22ce4a490..1ae87b9ed 100644
--- a/roles/run-heat-tests/defaults/main.yaml
+++ b/roles/run-heat-tests/defaults/main.yaml
@@ -3,3 +3,4 @@ tempest_test_timeout: ''
tempest_tox_environment: {}
heat_tempest_plugin: /opt/stack/heat-tempest-plugin
constraints_file: /opt/stack/requirements/upper-constraints.txt
+target_branch: "{{ zuul.branch }}"
diff --git a/roles/run-heat-tests/tasks/main.yaml b/roles/run-heat-tests/tasks/main.yaml
index 4af1d0e03..03661d774 100644
--- a/roles/run-heat-tests/tasks/main.yaml
+++ b/roles/run-heat-tests/tasks/main.yaml
@@ -3,9 +3,17 @@
tempest_tox_environment: "{{ tempest_tox_environment | combine({'OS_TEST_TIMEOUT': tempest_test_timeout}) }}"
when: tempest_test_timeout != ''
+- name: Override target branch
+ set_fact:
+ target_branch: "{{ zuul.override_checkout }}"
+ when: zuul.override_checkout is defined
+
- name: Set TOX_CONSTRAINTS_FILE
set_fact:
+ # Set TOX_CONSTRAINTS_FILE/UPPER_CONSTRAINTS_FILE to stable constraints only
+ # for the EM stable branch where old tempest (not master) is used.
tempest_tox_environment: "{{ tempest_tox_environment | combine({'UPPER_CONSTRAINTS_FILE': constraints_file}) | combine({'TOX_CONSTRAINTS_FILE': constraints_file}) }}"
+ when: target_branch in ["stable/ocata", "stable/pike", "stable/queens", "stable/rocky", "stable/stein", "stable/train", "stable/ussuri", "stable/victoria", "stable/wallaby"]
- name: Allow git to read plugin directories
become: true