Moving .zuul.d/project.yaml to .zuul.yaml as it is the only file in
that folder and to look similar to other oslo repos.
Change-Id: I787f57e57e5dd83d08dfaecca2405bf064c9f924
We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].
I propose to drop this test because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html
Change-Id: I83e50eade2cf9924424d763421e464e559c16a08
When troubleshooting, it's often interesting to see the deltas between
the default or sample configs and the running configuration. The
oslo_config.validator is a great tool to integrate this feature across
all projects. It can also be easily captured by data collection tools
like sosreports with the current deployment packages.
Change-Id: I172d82f19a81282093b0d5f7ae4c1817801cd887
Signed-off-by: David Vallee Delisle <dvd@redhat.com>
HostDomain is like HostAddress with the support of
_ character - RFC1033
openstack services are failing to start when a hostname with underscore
_ is provided.
Example:
```
overcloud-novacompute_edge1-0.internalapi.localdomain
overcloud-novacompute_edge1-0.internalapi
```
Nova use `HostAddressOpt` to define `live_migration_inbound_addr`,
and if a hostname with underscore is present in the config file
then the service fail to start.
Example:
```
/etc/nova/nova.conf
live_migration_inbound_addr =
overcloud-novacompute_edge1-0.internalapi.localdomain
```
FQDN is a domain name that specifies its exact
location in the tree hierarchy of the Domain Name System (DNS).
Underscore are allowed by RFC1033 [1][2][3]. Indeed, while a hostname may not
contain other characters, such as the underscore character (_), other
DNS names may contain the underscore.[1][2].
Systems such as DomainKeys and service records use the underscore.
These changes allow us to use underscore with the `HostDomain`.
[1] https://www.ietf.org/rfc/rfc1912.txt
[2] https://www.ietf.org/rfc/rfc1033.txt
[3] http://domainkeys.sourceforge.net/underscore.html
Co-authored-by: Daniel Bengtsson <dbengt@redhat.com>
Change-Id: I0a0670207f96a987996d329e5efa9a5eb2ce000c
Closes-Bug: #1892044
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.
Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.
pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)
For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks
Change-Id: I65a40bbff17d92b959764846801d5e0ddd3b97ce
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Add file to the reno documentation build to show release notes for
stable/victoria.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.
Change-Id: I59fa3a4e5ced137e61b8c08d63995d2a20693a92
Sem-Ver: feature
While we're here, specifying the doctree directory and configuring use
of saved environments doesn't really make sense when we blast all
previous doc build artefacts away on each build, so stop specifying
those.
Change-Id: I2b04a5c0ac121954aed91ae133e249a2e5813ee0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is necessary to enable parallel builds. As noted in the Sphinx docs
[1], this method has the following function:
Merge in data regarding docnames from a different domaindata inventory
(coming from a subprocess in parallel builds).
Given how simple the datatypes we're storing are, this is pretty easy to
implement.
[1] https://www.sphinx-doc.org/en/master/extdev/domainapi.html#sphinx.domains.Domain.merge_domaindata
Change-Id: I46c7903b159f99c68896a4c3c4d20daef848f9c2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1895162
This patch bumps bandit allowed version to >=1.6.0,<1.7.0 in order to
avoid the errors detailed here https://github.com/PyCQA/bandit/pull/393
Change-Id: Iec3897279cf81f951225f463450c6a1efd028b0b
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
This lets us use powerful rST roles and directives in our help text
without these being emitted to the configuration file, where they don't
read quite as well. It also fixes our formatting somewhat, which is
nice.
Note that we're doing something funky where we disable line wrapping. We
can't totally disable this due to how rst2txt works, so instead we set
the line length to an arbitrarily long line length, which is taken from
RFC5322 (Internet Message Format) for want of something better. I
personally question whether anyone is configuring this, but that's a
fight for another day.
Also note that this might caught issues for people who are using invalid
rST in their docstrings or use roles/directives in their config options
that aren't part of the standard Sphinx set or oslo.config set. They
will already be seeing the former issues if they are using the
'sphinxext' extension though, and the latter sounds like it would be
fairly rare.
Change-Id: I6c7208f0facfb4f334d7440cb6a9562901543dd3
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
stevedore has switched to importlib_metadata[1] and
this breaked unit test as the test relied on internal
implementation of it.
Instead we should switch to mock NamedExtensionManager
that's what called by oslo_config.
[1] https://review.opendev.org/#/c/739306/
Closes-Bug: #1888208
Change-Id: Ic4b990a387d875a351c9f8e7eaaef726734ff305
Importing pkg_resources scans all of the installed modules for data
that won't be used. Switch to using importlib.metdata, which more
efficiently loads the metadata for a package.
Change-Id: Idd2a0d0026fef9296172c9995b428ea43a746483
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This updates lower constraints to versions that will work with py38 so
that when we move to running on focal nodes, which has py38 as its
default py3 runtime, the lower-constraints job will continue to pass.
It also cleans out some secondary requirements that are no longer needed
due to our direct dependencies being updated.
Linters are removed that are kept in the global requirements blacklist
as those are not version tracked and are not relevant for our
lower-constraints unit test runs.
Change-Id: Ied58e8aeb700c15354f1c040b2623f498d636061
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
These are used when declaring an option with a custom type. There's no
reason they shouldn't be handled and indeed they are albeit with an ugly
warning. Resolve this by making this handling explicit.
Change-Id: Ib7a6f26496cf19777b020c12998e953e9aae4601
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-bug: #1880852
This raises hacking to a newer version, fixes a few issues the newer
version uncovered, and removes the cap for flake8 to allow that version
to be controlled by the hacking constraints.
Change-Id: Ie550119322bca3c217e4a74eca789f156cfa7e2c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests (other than pep8).
more info: https://github.com/openstack/requirements/blob/master/blacklist.txt
Change-Id: If14b70ceb1642ba3b81385a49fb0686be7628a2d
The 3.8.0 version introduces some checks that cause failures with the
current code. To avoid that, this caps flake8 to a version that had been
tested withouth errors so hacking does not pull in a newer version.
We will likely want to raise hacking to 3.x and drop this cap, but to
make it easy to backport to stable branches, taking this approach first.
Change-Id: I2a539263e8cfc7d15243d78e20b70b8ed763b8fd
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
oslo config code treat treats the '$' as a special character and it
needs to be delimited when using within a string. There are two ways of
doing this, '$$' or '\$'. We document the former but not the latter. Fix
this.
Change-Id: I37cdf31ba1c2924779a46b1a2eeabb66c46a2212
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1872839
As discussed in bug 1841038, configuring a StrOpt with a regex parameter
and providing an invalid environment variable will result in an ugly
stacktrace due to an undefined 'alt_loc' variable. Resolve this by
creating said variable.
Change-Id: Id0fb6efdc435a2bd88d5dfea2b4720df453fbfec
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1841038
This adds the return of some metadata to our sphinx extension setup to
indicate they are thread safe. This is needed to allow consuming
projects to do multithreaded docs builds. In some cases, this can save a
noticeable amount of time in job execution.
Change-Id: I53a580b336a49372e27b69d009da555c03f03e35
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>