Use master upper-constraints when installing tempest plugins

when tempst venv is build, it use the master upper_contraint[1]
but when we install tempest plugin, it use branch upper_contraint.

This leads to mismatch the dependency version between tempest and required
tempest plugins setup.

Current flow after this change is:

1. install tempest form master (until you explicitly change TEMPEST_BRANCH
   which is default to master in all stable branch). It applies the upper_constraint
   from the stable branch but that will be overridden in step2
2. configure tempest, here the created venv will install all dependency with
   master's upper_constraint.
3. install tempest plugins in same venv created above. Now tempest plugin
   will also use the master upper_constraint.

With this tempest venv which has all enabled plugin will be contsraint with
master.

[1] 72f632222f/lib/tempest (L590)

Change-Id: I89314e8391e8f26c622fc090cbe27997b3cf049a
Closes-Bug: #1816022
This commit is contained in:
ghanshyam 2019-02-27 11:10:05 +00:00
parent 72f632222f
commit 0d83e09464

View File

@ -673,7 +673,9 @@ function install_tempest {
function install_tempest_plugins { function install_tempest_plugins {
pushd $TEMPEST_DIR pushd $TEMPEST_DIR
if [[ $TEMPEST_PLUGINS != 0 ]] ; then if [[ $TEMPEST_PLUGINS != 0 ]] ; then
tox -evenv-tempest -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt $TEMPEST_PLUGINS # 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
echo "Checking installed Tempest plugins:" echo "Checking installed Tempest plugins:"
tox -evenv-tempest -- tempest list-plugins tox -evenv-tempest -- tempest list-plugins
fi fi