21ed95f9b6
This is a combination of five patch to fix the gate: 1. Use compatible version of heat-tempest-plugin heat-tempest-plugin dropped py38 support, hence it cannot be installed from recent master, so we need to override the checkout to the version that still supports py38 and compatible to the actual branch. This is needed both for the grenade job and the functional job, because these are using the heat-tempest-plugin. 2. Try archive path to download Fedora image This is a temporal workaround to allow downloading Fedora 37 image which was moved to the archive path. 3. Remove reference to devstack-gate devstack-gate was deprecated in xena and is being retired now[1]. 4. [stable-only] Cap setuptools <71.0.0 py39 jobs (on ubuntu-focal) started to fail due to recent virtualenv release (20.26.4) on Yoga (which bundles setuptools), because we have 'packaging==21.3' in this branch that is not compatible with newer setuptools [2]. setuptools is bundled in virtualenv, so it has to be capped via the virtualenv package. tox also needed to be capped (<4) as gate uses tox 3.28.0, but with capping virtualenv we pull in latest tox as well, which would cause other errors. 5. Set functional jobs as non-voting heat-functional jobs try to install python-zaqarclient (via zaqar project) from master branch, but on master the client dropped py38 support, hence the jobs fail. This patch sets it non-voting as a quick workaround until a final fix arrives. [1] https://review.opendev.org/c/openstack/governance/+/919629 [2] https://github.com/pypa/setuptools/issues/4483 Changes: .zuul.yaml NOTE(elod.illes): change in .zuul.yaml is to adapt the patch to the current branch ('<series>-last' needs to be used). Change-Id: I9b1702749976a2cea42a24130e5fec2931b75ce1 (cherry picked from commita806b400cf
) (cherry picked from commitae6225890e
) (cherry picked from commit4fd9953a55
) (cherry picked from commit81a8b93254
) (cherry picked from commit665ccfc262
) (cherry picked from commitc18b344591
) (cherry picked from commitdcf7403635
)
162 lines
5.4 KiB
INI
162 lines
5.4 KiB
INI
[tox]
|
|
envlist = py36,py37,py38,pep8
|
|
ignore_basepython_conflict = True
|
|
minversion = 3.1.0
|
|
skipsdist = True
|
|
# Cap setuptools via virtualenv to prevent compatibility issue with yoga
|
|
# branch's upper constraint of 'packaging' package (21.3).
|
|
requires =
|
|
virtualenv<20.26.4
|
|
tox<4
|
|
setuptools<71.0.0
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
OS_TEST_PATH=heat/tests
|
|
install_command = pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena} {opts} {packages}
|
|
usedevelop = True
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source
|
|
python tools/custom_guidelines.py --exclude heat/engine/resources/aws
|
|
# The following bandit tests are being skipped:
|
|
# B101: Test for use of assert
|
|
# B104: Test for binding to all interfaces
|
|
# B107: Test for use of hard-coded password argument defaults
|
|
# B110: Try, Except, Pass detected.
|
|
# B310: Audit url open for permitted schemes
|
|
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purposes
|
|
# B404: Import of subprocess module
|
|
# B410: Import of lxml module
|
|
# B504: Test for SSL use with no version specified
|
|
# B506: Test for use of yaml load
|
|
# B603: Test for use of subprocess with shell equals true
|
|
# B607: Test for starting a process with a partial path
|
|
bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607
|
|
doc8 {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --source heat --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
whitelist_externals =
|
|
rm
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
|
|
|
[testenv:pdf-docs]
|
|
deps = {[testenv:docs]deps}
|
|
whitelist_externals =
|
|
make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:api-ref]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref to docs.openstack.org.
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
whitelist_externals = rm
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W --keep-going -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file=config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
commands =
|
|
oslopolicy-sample-generator --config-file etc/heat/heat-policy-generator.conf
|
|
|
|
[testenv:bandit]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
|
-r{toxinidir}/test-requirements.txt
|
|
# The following bandit tests are being skipped:
|
|
# B101: Test for use of assert
|
|
# B104: Test for binding to all interfaces
|
|
# B107: Test for use of hard-coded password argument defaults
|
|
# B110: Try, Except, Pass detected.
|
|
# B310: Audit url open for permitted schemes
|
|
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purposes
|
|
# B404: Import of subprocess module
|
|
# B410: Import of lxml module
|
|
# B504: Test for SSL use with no version specified
|
|
# B506: Test for use of yaml load
|
|
# B603: Test for use of subprocess with shell equals true
|
|
# B607: Test for starting a process with a partial path
|
|
commands = bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607
|
|
|
|
[flake8]
|
|
show-source = true
|
|
# E123 closing bracket does not match indentation of opening bracket's line
|
|
# W503 line break before binary operator
|
|
# W504 line break after binary operator
|
|
ignore = E123,W503,W504
|
|
exclude=.*,dist,*lib/python*,*egg,build,*convergence/scenarios/*
|
|
max-complexity=23
|
|
|
|
[doc8]
|
|
ignore = D001
|
|
ignore-path = .venv,.git,.tox,.tmp,*heat/locale*,*lib/python*,openstack_heat.egg*,doc/build,releasenotes/*
|
|
|
|
[hacking]
|
|
import_exceptions = heat.common.i18n
|
|
|
|
[flake8:local-plugins]
|
|
extension =
|
|
Heat301 = checks:no_log_warn
|
|
Heat302 = checks:check_python3_no_iteritems
|
|
Heat303 = checks:check_python3_no_iterkeys
|
|
Heat304 = checks:check_python3_no_itervalues
|
|
paths = ./heat/hacking
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:releasenotes]
|
|
whitelist_externals =
|
|
rm
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
|
|
|
[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
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files, and develop mode disabled
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
# further relies on "tox.skipsdist = True" above).
|
|
deps = bindep
|
|
commands = bindep test
|
|
usedevelop = False
|