From 2ef4a4c8516bc6373bc7f4cafee62db715144952 Mon Sep 17 00:00:00 2001 From: "Dr. Jens Harbott" Date: Mon, 3 Jan 2022 15:13:44 +0100 Subject: [PATCH] Fix tempest upper-constraints When deploying devstack in a stable branch, the master branch is available locally only in a CI environment where Zuul prepares all available branches. For a non-CI deployment we need to stick to using the remote branch as was the case before [0]. While the situation on the master branch isn't really broken, we apply the fix here anyway so that future stable branches are created in a working state. [0] I5d42ac6b54bf20804d7e5faa39d1289102318b64 Closes-Bug: #1956219 Signed-off-by: Dr. Jens Harbott Change-Id: Ib7719cb2d48b34db70f885e0afe77d904abba3b5 --- lib/tempest | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tempest b/lib/tempest index bdbd3caec8..adffeda371 100644 --- a/lib/tempest +++ b/lib/tempest @@ -119,7 +119,9 @@ function set_tempest_venv_constraints { local tmp_c tmp_c=$1 if [[ $TEMPEST_VENV_UPPER_CONSTRAINTS == "master" ]]; then - (cd $REQUIREMENTS_DIR && git show master:upper-constraints.txt) > $tmp_c + (cd $REQUIREMENTS_DIR && + git show master:upper-constraints.txt 2>/dev/null || + git show origin/master:upper-constraints.txt) > $tmp_c else echo "Using $TEMPEST_VENV_UPPER_CONSTRAINTS constraints in Tempest virtual env." cat $TEMPEST_VENV_UPPER_CONSTRAINTS > $tmp_c