- enable run of ansible-lint, with a temporary set of excludes
- fixes two problems reported by ansible-linter
Change-Id: Ibbe23db8fd5ac1008109f50f514df96686b0fa19
Bug: #1921409
- fixed bindep to allow execution under fedora
- fixed flake8 config to use officially recommended use patterns
- assured that git does not report dirty after running tox (both
pep8 and tht environments where breaking this by creating untracked
files). tox-extra plugin addition will prevent future regressions.
Change-Id: I4137056853f8c5f1c2304bfb6ec1188a82b12130
Bug: #1921409
- Use version agnostic "py" inside tox default envs
- Enable py39 testing jobs (new template contains them)
- Address deprecation warning in setup.cfg regarding use of dashes
instead of underlines (avoid future breakage with setuptools)
Change-Id: I26be50e029393e01db6718a21ac67d669ccd2e0c
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver [1] for the release team [2][3].
Removed specific doc requirements from test-requirements.txt.
The problem here is that this repos haven't doc/requirements.txt file
and by default in this case zuul will use the test-requirements.txt file
to
pull requirements [4].
This requirements file contains extra requirements like flake8 that
collided with those allowed in our job environment and so the new pip
resolver fails to install these requirements and the job exits in error.
This project meet the conditions leading to the bug.
/!\/!\/!\
Notice that I voluntarily added the doc directory even if no docs
are generated here because zuul will try to pull this requirements from
there first and the contained requirements are needed for reno but AFAIK
the releasenotes dir is ignored by zuul. c.f [4] for further details.
/!\/!\/!\
[1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html
[4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36
Change-Id: I519ef389448acb3dde328a0e61c074e48d7e0466
This file, and its tests, are not useful for tripleo so we're
removing because they're now becoming problematic.
Change-Id: I4207e7f543f33dda640bf0784e54311c66ba4e30
Signed-off-by: Kevin Carter <kecarter@redhat.com>
With the switch to Ubuntu Focal for tox jobs via https://review.opendev.org/#/c/738322/
our 1.1.0 version of hacking pulls in old modules that are not compatible
with python3.8:
https://github.com/openstack/hacking/blob/1.1.0/requirements.txt#L6
Let's upgrade hacking to >= 3.0.1 and < 3.1.0 so that it supports python3.8
correctly. The newer hacking also triggered new errors which are
fixed in this review as well:
./tools/render-ansible-tasks.py:113:25: F841 local variable 'e' is assigned to but never used
./tools/yaml-validate.py:541:19: F999 '...'.format(...) has unused arguments at position(s): 2
./tools/render-ansible-tasks.py:126:1: E305 expected 2 blank lines after class or function definition, found 1
./tools/yaml-validate.py:33:1: E305 expected 2 blank lines after class or function definition, found 1
./container_config_scripts/tests/test_nova_statedir_ownership.py:35:1: E305 expected 2 blank lines after class or function definition, found 0
Also make sure we exclude .tox and __pycache__ from flake8 as well
We also need to change the lower-constraint requirements to make them
py3.8 compatible. See https://bugs.launchpad.net/nova/+bug/1886298
cffi==1.14.0
greenlet==0.4.15
MarkupSafe==1.1.0
paramiko==2.7.1
Suggested-By: Yatin Karel <ykarel@redhat.com>
Change-Id: Ic280ce9a51f26d165d4e93ba0dc0c47cdf8d7961
Closes-Bug: #1895093
Since upstream requirements is removing support of py27 but
TripleO jobs still runs on py27 and which is going to break
the deps installation.
In order to fix, we can create a seperate testenv py27
to handle that and it should not depends on upstream
constriants.
Related-Bug: #1861803
Change-Id: I61365503cc1c70644d6520f54646492359fa4e44
It's recommand to use this way. With tox is not really necessary to do
it but it can be good to use it. See this article:
https://snarky.ca/why-you-should-use-python-m-pip/
For example python -m pip executes pip using the Python interpreter
you specified as python.
Change-Id: Icf90d76eb51c4a52c2cfda0f51f64697bd5cfdb9
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045
Change-Id: I806842ce6d2522deab060f5e9ef6607a1e919dbf
Until now if there is a nit inside any
Ansible task part of tripleo-heat-templates we will
need to wait until the end-to-end test imports
the actual tasks to fail.
This submission adds the hability to run a syntax
check for any Ansible task part of any role
defined by default in the resource registry.
Also it will allow to reduce the CI CO2 footprint
by not executing unneeded jobs meant to fail.
Let's save the planet and some CI cycles.
Change-Id: I6eb7c873cc9a4b7d765e745dc260475bff7b268a
This change makes sure that we apply pyflake8 checks on all python
codes to improve its readability.
Note that there are some rules applied for other OpenStack projects,
but not yet turned on, which should be enabled in the future.
Change-Id: Iaf0299983d3a3fe48e3beb8f47bd33c21deb4972
Change order of default tox envlist in order of likeliness to fail on a
new change and add py37 and py36.
Change-Id: If72e480c12385463088e2e0962801cd7095a6f12
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ifa8bcc1c1c29551a0ff80edc82699028c8305fe6
Closes-Bug: #1801657
It is always safe to define the minimal tox version required to run,
if the host tox is less than this the tool will exit with an error
message indicating the user needs to upgrade tox.
For ref: https://tox.readthedocs.io/en/latest/config.html#tox-global-settings
Change-Id: I3b387930451d78e20a69b8c29b0b28290673ef78
The nova_compute container kolla config is currently set to recursively change
the ownership of /var/lib/nova to nova:nova on startup.
This is necessary when upgrading from an non-container deployment to a
containerized deployment as the nova uids are not consistent across the host
and container image.
If the nova instancedir is an NFS mount then open filehandles are
broken and every VM using that NFS export fails with I/O errors.
This change re-implements the nova statedir ownership logic to target only the
files/directories controlled by nova.
Requires dist-git change: https://review.rdoproject.org/r/14734
Change-Id: I57d421feb6356d28002e77fb9bfa50a397758cbf
Closes-bug: 1778465
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I09bb55e842515307fbedeee6ba6519dfa4b95e24
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I67d2ab519d1baf463e4ad253b8a85b5194ad31f6
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This uses the -c parameter to process-templates.py to clean the
generated templates in the local repo.
Change-Id: Ib105f60a1e54a6d6372d00bb2db6a9b378b2176e
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: I18b21a396b8df4224cb21ce5b8fd062f80604167
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I0b36f95fa92f15159156815bc6d8e1add8902182
The roles data validation added in
2eb1476b6e93279d4ee4988c856dba50ab168bc5 was never run due to a typo in
tox.ini.
Change-Id: I0a151c9863086e4447cedf0790a9e4a18f433cfe
Closes-Bug: #1718391
This check ensures that if a parameter is changed that would affect
a generated environment then the environment must be updated before
pep8 will pass. It will also catch any mistaken hand edits to the
generated files.
bp generated-environments
Change-Id: I2d12992ed55f963285422e1282a4cee06e989b6d
With the merging of Iad3e9b215c6f21ba761c8360bb7ed531e34520e6 the
roles_data.yaml should be generated with tripleoclient rather than
edited. This change adds in a pep8 task to verify that the appropriate
role files in roles/ have been modified to match how our default
roles_data.yaml is constructed. Additionally this change adds a new tox
target called 'genrolesdata' that will all you to automatically generate
roles_data.yaml and roles_data_undercloud.yaml
Change-Id: I5eb15443a131a122d1a4abf6fc15a3ac3e15941b
Related-Blueprint: example-custom-role-environments
We're not going to want to list every single sample environment in
a single file, so let's also take a directory and just read every
yaml file in it. This commit adds support for that as well as
some initial environments to demonstrate its use.
Change-Id: If2c608f2a61fc5e16784ab594d23f1fa335e1d3c
This is a tool to automate the generation of our sample environment
files. It takes a yaml file as input, and based on the environments
defined in that file generates a number of sample environment files
from the parameters in the Heat templates. A tox genconfig target
is added that mirrors how the other OpenStack services generate
their sample config files.
A description of the available options for the input file is
provided in a README file in the sample-env-generator directory.
In this commit only a single sample config is provided as a basic
example of how the tool works, but subsequent commits will add
more generated sample configs.
Change-Id: I855f33a61bba5337d844555a7c41b633b3327f7a
bp: environment-generator
This patch updates the pep8 task (which is executed in CI) so
that it generates templates locally. This will give us extra
CI coverage to ensure our generated templates produce valid
YAML.
Change-Id: I2287802d44c0ebe404d3fce30f04efcc3c6ab27f
This patch adds a local version of our template processing
routine so that developers can more quickly view the templates
that are actually getting generated. I've noticed multiple developers
now do a full deployment with 'overcloud deploy' only to download
the swift container with the generated templates. This simple task
avoids that step by allowing developers to generate it locally.
It also aims to preserve the ability to use t-h-t templates directly
with Heat (instead of going through Mistral) should users wish to do that.
The new undercloud heat installer requires the ability to generate
templates without requiring Mistral and Swift to do so.
Ideally the Mistral API workflow would use this same code
so perhaps in the future we might modify that routine to:
-download swift tarball containing the templates
-run this local routine that lives in t-h-t
-re-upload the tarball of templates to the swift container
Change-Id: Ie664c9c5f455b7320a58a26f35bc403355408d9b
This is the new blessed naming scheme for lint-type jobs such as
pep8 or the yaml validation job we have in this project. Doing
this rename will allow us to use standard infra job templates
to run validation on proposed changes.
Change-Id: I0a4c4372429a08e0babb4d323f2b027f1d95f3d7
Adds a "validate" tox env for basic sanity checking of templates.
Currently it just validates that all of the .yaml files are in fact
valid YAML. In the future we might want to add more, but this
seemed like a reasonable start.
Change-Id: I8091bbad0003b150e23dae5de4f465053c982229