Skip blazar install in docs and pep8 jobs

After installing doc build requirements with upper constraints, tox was
installing blazar without constraints, which was pulling Jinja2 3.1.0
(released today) as a Flask dependency. This caused a docs build failure
on stable/wallaby, because Jinja2 dropped support for environmentfilter
used by the version of Sphinx in upper constraints.

Use skip_install to instruct tox not to install blazar when not needed.
This requires adding oslo.config and oslo.policy to doc/requirements.txt
because we use their sphinx extensions.

Also make lower-constraints job non-voting in the gate.

Change-Id: Ic55dba0038a2209e9fb291a604a5c1da57607e1e
(cherry picked from commit 2c3d94ce3b)
This commit is contained in:
Pierre Riteau 2022-03-24 23:09:24 +01:00
parent 8d905a2f5b
commit e33f4ea826
3 changed files with 7 additions and 0 deletions

View File

@ -19,3 +19,5 @@
jobs: jobs:
- blazar-tempest-plugin-base - blazar-tempest-plugin-base
- blazar-tempest-plugin-ipv6-only - blazar-tempest-plugin-ipv6-only
- openstack-tox-lower-constraints:
voting: false

View File

@ -3,3 +3,5 @@ reno>=3.1.0 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0 openstackdocstheme>=2.2.1 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0 os-api-ref>=1.4.0 # Apache-2.0
oslo.config>=6.8.0 # Apache-2.0
oslo.policy>=3.6.0 # Apache-2.0

View File

@ -33,12 +33,14 @@ commands =
coverage report coverage report
[testenv:pep8] [testenv:pep8]
skip_install = True
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[testenv:docs] [testenv:docs]
skip_install = True
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena} deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
commands = commands =
@ -47,6 +49,7 @@ commands =
sphinx-build -W -b html doc/source doc/build/html sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs] [testenv:pdf-docs]
skip_install = True
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
allowlist_externals = make allowlist_externals = make
commands = commands =