Use stable constraint for Tempest pinned stable branches
Stable branches till stable/rocky is using python
version <py3.6. Tempest test those branch in venv
but Tempest tox use the master upper-constraint[1]
which block installation due to dependencies
require >=py3.6. For exmaple, oslo.concurrency 4.0.0
is not compatible for <py3.6.
As we pin Tempest for EM stable brach, we should be
able to use stable constraint for Tempest installation
as well as while running during run-tempest playbook.
tox.ini is hard coded to use master constraint[1] which force
run-tempest to recreate the tox env and use the master constraint.
Fix for that- https://review.opendev.org/#/c/705870/
Devstack can set stable u-c to use via env var so that
Tempest installation in venv will use stable
branch constraint.
[1] bc9fe8eca8/tox.ini (L14)
Change-Id: I3823d9386a0d1bbe5adf3191ab4f40a89835dc18
This commit is contained in:
parent
79b6124264
commit
8e8a46f0a2
17
lib/tempest
17
lib/tempest
|
@ -543,9 +543,8 @@ function configure_tempest {
|
|||
tox -revenv-tempest --notest
|
||||
fi
|
||||
|
||||
# The requirements might be on a different branch, while tempest needs master requirements.
|
||||
(cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > u-c-m.txt
|
||||
tox -evenv-tempest -- pip install -c u-c-m.txt -r requirements.txt
|
||||
# NOTE(gmann): Use branch constraint because Tempest is pinned to the branch release instead of using master.
|
||||
tox -evenv-tempest -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
|
||||
|
||||
# Auth:
|
||||
iniset $TEMPEST_CONFIG auth tempest_roles "Member"
|
||||
|
@ -640,6 +639,12 @@ function install_tempest {
|
|||
# TEMPEST_DIR already exist until RECLONE is true.
|
||||
git checkout $TEMPEST_BRANCH
|
||||
|
||||
# NOTE(gmann): Use branch constraint because Tempest is pinned to the branch release
|
||||
# instead of using master. We need to export it via env var UPPER_CONSTRAINTS_FILE
|
||||
# so that initial creation of tempest tox use stable branch constraint
|
||||
# instead of master constraint as defined in tempest/tox.ini
|
||||
export UPPER_CONSTRAINTS_FILE=$REQUIREMENTS_DIR/upper-constraints.txt
|
||||
|
||||
tox -r --notest -efull
|
||||
# NOTE(mtreinish) Respect constraints in the tempest full venv, things that
|
||||
# are using a tox job other than full will not be respecting constraints but
|
||||
|
@ -653,9 +658,9 @@ function install_tempest {
|
|||
function install_tempest_plugins {
|
||||
pushd $TEMPEST_DIR
|
||||
if [[ $TEMPEST_PLUGINS != 0 ]] ; then
|
||||
# The requirements might be on a different branch, while tempest & tempest plugins needs master requirements.
|
||||
(cd $REQUIREMENTS_DIR && git show master:upper-constraints.txt) > u-c-m.txt
|
||||
tox -evenv-tempest -- pip install -c u-c-m.txt $TEMPEST_PLUGINS
|
||||
# NOTE(gmann): Use branch constraint because Tempest is pinned to the branch release
|
||||
# instead of using master.
|
||||
tox -evenv-tempest -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt $TEMPEST_PLUGINS
|
||||
echo "Checking installed Tempest plugins:"
|
||||
tox -evenv-tempest -- tempest list-plugins
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue