From 5c86db74c883474c25a233789398536eb8057eb0 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Fri, 13 Jan 2023 13:48:38 +0000 Subject: [PATCH] Pin tox to be less than 4 The dev environment used by some docs developers uses an old version of tox, and does not support the allowlist_externals entry required by tox 4. The version of tox used by some other developers cannot support tox.ini that contains both allowlist_externals and whitelist_externals in the same file. The fix for now is to stay with whitelist_externals and tox<4 This fix mostly reverts and re-works these two commits https://review.opendev.org/c/starlingx/docs/+/869229 https://review.opendev.org/c/starlingx/docs/+/868621 Partial-Bug: #2000399 Signed-off-by: Al Bailey Change-Id: Ib8a5eea5d27e7b7347bc717d11f9dc5a0be4f396 --- .zuul.yaml | 2 ++ tox.ini | 18 ++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 14395d18d..0cbce6540 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,5 +1,7 @@ --- - project: + vars: + ensure_tox_version: '<4' templates: - stx-api-ref-jobs check: diff --git a/tox.ini b/tox.ini index c34333b31..a4e12db87 100644 --- a/tox.ini +++ b/tox.ini @@ -29,24 +29,24 @@ commands = git restore doc/source/dist_cloud/kubernetes/* bash hw-updates.sh bash htmlChecks.sh doc/build/html -allowlist_externals = bash + +# Note: The dev env for the docs team uses a version of tox that does not yet support allowlist_externals +whitelist_externals = bash htmlChecks.sh get-remote-files.sh git # hw-updates.sh -whitelist_externals = {[testenv:docs]allowlist_externals} + [testenv:api-ref] deps = {[testenv:docs]deps} commands = rm -rf api-ref/build sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html -allowlist_externals = rm -whitelist_externals = {[testenv:api-ref]allowlist_externals} +whitelist_externals = rm [testenv:linters] -allowlist_externals = bash -whitelist_externals = {[testenv:linters]allowlist_externals} +whitelist_externals = bash commands = bash -c "find {toxinidir} \ \( -name .tox -prune \) \ @@ -64,16 +64,14 @@ passenv=PWD commands = bash -c "echo Running in {env:PWD}" bash new-topic.sh {env:PWD} {toxinidir} -allowlist_externals = new-topic.sh +whitelist_externals = new-topic.sh bash -whitelist_externals = {[testenv:newfile]allowlist_externals} [testenv:picks] commands = ./pickCompare.sh -allowlist_externals = pickCompare.sh +whitelist_externals = pickCompare.sh bash -whitelist_externals = {[testenv:picks]allowlist_externals} [testenv:linkcheck]