From b88008dd64049de8a3ae7e38ee76d563134af2ef Mon Sep 17 00:00:00 2001 From: rabi Date: Tue, 3 Jan 2023 09:34:32 +0530 Subject: [PATCH] Fix issues with tox 4.2.4 tox now hard fails if there is mismatch in spec attributes[1]. This works around the issue temporarily. We probably have to drop py38 jobs and specify basepython for py39 target in the future. Removes ansible-galaxy --timeout for py* jobs to workaround. We may hit the timeout with py* jobs. [1] https://github.com/tox-dev/tox/pull/2824/ Closes-Bug: #2001602 Closes-Bug: #2002035 Change-Id: Iad2455193885205236e03c1219352102bb931de8 --- tox.ini | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tox.ini b/tox.ini index 8e1032929..fedda9250 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,10 @@ [tox] minversion = 3.18.0 envlist = docs,linters +ignore_base_python_conflict = True [testenv] +basepython = python3 usedevelop = True passenv = * setenv = @@ -33,7 +35,9 @@ deps = -r {toxinidir}/test-requirements.txt -r {toxinidir}/ansible-requirements.txt commands = - ansible-galaxy install --timeout 600 -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml +# ansible-core 2.13.6 installed with py38 does not provide a way to set +# timeout with ansible-galaxy command. + ansible-galaxy install -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml stestr run {posargs} allowlist_externals = bash @@ -41,13 +45,6 @@ allowlist_externals = true ansible-galaxy -[testenv:py38] -# ansible-core 2.3.16 installed with py38 does not provide a way to set -# timeout with ansible-galaxy command. -commands = - ansible-galaxy install -fr {toxinidir}/tripleo_ansible/ansible-collections-requirements.yml - stestr run {posargs} - [testenv:bindep] # Do not install any requirements. We want this to be fast and work even if # system dependencies are missing, since it's used to tell you what system @@ -70,7 +67,6 @@ commands = python -m pre_commit run -a [testenv:releasenotes] -basepython = python3 deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r {toxinidir}/doc/requirements.txt @@ -78,7 +74,6 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html [testenv:docs] -basepython = python3 deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r {toxinidir}/doc/requirements.txt @@ -105,7 +100,6 @@ skip_install = True sitepackages = False [testenv:role-addition] -basepython = python3 deps = pre-commit virtualenv