From 9dc820f2ae32a726d8fe457f471809f57c2b97f0 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Wed, 4 May 2022 19:52:48 +0200 Subject: [PATCH] TOX: Document install_command usage This patch documents in tox.ini the change introduced by change-id Ic9a6ac412a334710eb5e45935cd301ca80a5edb9 where we use "install_command" to prevent installing dependencies without constraints. We document it to prevent people from thinking that just adding the constraints in "deps" is enough and removing the "install_command" line. Change-Id: Iccd84cb5d4db78e4953d58a05392c61b08988d4e --- tox.ini | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tox.ini b/tox.ini index 96671721886..9d81dc1d869 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,17 @@ setenv = PYTHONDONTWRITEBYTECODE=1 # TODO(stephenfin): Remove once we bump our upper-constraint to SQLAlchemy 2.0 SQLALCHEMY_WARN_20=1 +# NOTE: Do not move the constraints from the install_command into deps, as that +# may result in tox using unconstrained/untested dependencies. +# We use "usedevelop = True" for tox jobs (except bindep), so tox does 2 +# install calls, one for the deps and another for the cinder source code +# as editable (pip -e). +# Without the constraints in the install_command only the first +# installation will honor the upper constraints, and the second install +# for cinder itself will not know about the constraints which can result +# in installing versions we don't want. +# With constraints in the install_command tox will always honor our +# constraints. install_command = python -m pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} deps =