1203 Commits

Author SHA1 Message Date
likui
50723fa870 remove lower-constraints.txt
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html

Change-Id: I407b2c9bc6e9c1cd5b070a1cdca7c0eabe19b0ca
2021-01-16 15:51:31 +08:00
Zuul
3767cfebb1 Merge "Remove Babel from lower-constraints.txt" 2021-01-16 06:50:07 +00:00
Zuul
80d35d69d4 Merge "Move zuul config file to root folder" 2021-01-14 12:36:08 +00:00
Moisés Guimarães de Medeiros
05b6a33336 inherit from object is not required for py3
Change-Id: I3f3b1dca78e2e9b2515231ccc6600b64f31039fb
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2021-01-12 17:09:25 +00:00
Moisés Guimarães de Medeiros
401dcd9fc4 Move zuul config file to root folder
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
2021-01-12 15:15:44 +01:00
Moisés Guimarães de Medeiros
cefa4d4750 Dropping lower constraints testing
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
2021-01-12 15:14:55 +01:00
Zuul
efa46b5f44 Merge "Adding --check-defaults to validator" 2020-11-26 15:36:33 +00:00
David Vallee Delisle
f2ca66fdc9 Adding --check-defaults to validator
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>
2020-11-24 13:55:33 -05:00
Zuul
68cefad313 Merge "tox: Enable parallel docs builds" 2020-11-05 21:54:01 +00:00
Hervé Beraud
ab18255dcd Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update this at
each new cycle.

Wallaby support officially the following runtimes [1]:
- Python 3.6
- Python 3.8

During Victoria Python 3.7 was used as the default runtime [2] however this
version isn't longer officially supported.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: Iab5475c25b3ff1ffd0b10766ab0a5dbd4b1c821a
2020-11-03 16:13:27 +01:00
Zuul
8f667f8e3d Merge "Add a new type HostDomain." 2020-10-22 18:16:44 +00:00
Hervé Beraud
6480356928 Add a new type HostDomain.
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
2020-10-22 12:30:39 +02:00
Zuul
445f1c42d9 Merge "Convert rst to plaintext for oslo.config output" 2020-10-12 17:38:22 +00:00
Zuul
dce2afd789 Merge "sphinxext: Add 'merge_domaindata'" 2020-09-22 14:51:47 +00:00
Hervé Beraud
5e1011a630 Adding pre-commit
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>
2020-09-22 12:25:01 +02:00
f97f99a0c4 Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Id3cb71eb863a9c80e7abc3d11e0fabaf1d6e6b5f
2020-09-11 20:56:38 +00:00
77ce4b54d0 Update master for stable/victoria
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
2020-09-11 20:56:35 +00:00
Stephen Finucane
ea51c21bd9 tox: Enable parallel docs builds
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>
2020-09-10 16:36:53 +01:00
Stephen Finucane
01f63b875e sphinxext: Add 'merge_domaindata'
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
2020-09-10 16:36:46 +01:00
likui
f1f873019d Remove Babel from lower-constraints.txt
Change-Id: I2012d7ceada837461b02a6041eb099d87306ed21
2020-09-03 14:53:59 +08:00
Moisés Guimarães de Medeiros
fcb88941e3 Bump bandit version
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>
2020-07-24 17:32:21 +02:00
Stephen Finucane
78698b5c99 Convert rst to plaintext for oslo.config output
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>
2020-07-23 11:47:05 +02:00
a2652b3584 Fix unit tests to work with stevedore > 2.0.1
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
2020-07-23 11:06:29 +05:30
Doug Hellmann
392922aa33 drop use of pkg_resources
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>
2020-07-05 19:37:01 -04:00
Zuul
accb8ded49 Merge "Align contributing doc with oslo's policy" 2020-07-01 08:18:53 +00:00
Sean McGinnis
04d5280c3d
Update lower-constraints versions
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>
2020-06-09 16:49:27 -05:00
Zuul
fcc0e08132 Merge "generator: Handle 'cfg.Opt'-type options" 2020-06-08 17:20:36 +00:00
melissaml
bfec5fd629 Fix pygments style
New theme of docs respects pygments_style.

more info: http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I88f448ac7fc7fb72187eb7bdad5bf19f327d8641
2020-06-04 16:00:30 +08:00
Stephen Finucane
8737919f3d generator: Handle 'cfg.Opt'-type options
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
2020-05-27 11:00:14 +01:00
Zuul
2b698facfd Merge "Remove the unused coding style modules" 2020-05-26 13:44:43 +00:00
Zuul
ad1eb1be0a Merge "Raise hacking minimum to 3.0.1" 2020-05-25 13:20:17 +00:00
Zuul
4801a91822 Merge "Add py38 package metadata" 2020-05-25 12:51:33 +00:00
Zuul
694826052d Merge "Remove six from lower-constraints.txt" 2020-05-22 22:36:15 +00:00
zhangboye
3019eed100 Add py38 package metadata
Change-Id: Ife181dce8ed8520852501f394f3b1d3975c619fa
2020-05-22 15:06:57 +08:00
Sean McGinnis
8242416801
Raise hacking minimum to 3.0.1
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>
2020-05-19 15:15:53 -05:00
Zuul
cfb8c1f4a5 Merge "Resolve UnboundLocalError" 2020-05-19 13:30:49 +00:00
jacky06
c6961e1f73 Remove the unused coding style modules
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
2020-05-16 04:26:38 +00:00
Zuul
23c6a81689 Merge "Cap flake8 to be < 3.8.0" 2020-05-14 21:15:45 +00:00
Sean McGinnis
b1836ad4d2
Cap flake8 to be < 3.8.0
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>
2020-05-12 11:22:03 -05:00
Zuul
2727d3e4e1 Merge "Add Python3 victoria unit tests" 2020-05-04 20:52:30 +00:00
Zuul
257a5ac232 Merge "Update master for stable/ussuri" 2020-05-04 19:21:48 +00:00
Hervé Beraud
da866fcc57 Align contributing doc with oslo's policy
Related to:
- https://review.opendev.org/#/c/723044/
- https://governance.openstack.org/tc/goals/selected/ussuri/project-ptl-and-contrib-docs.html

Change-Id: I52f370b5f1b2b956f7482139d9b4877cce502a98
2020-05-04 18:21:14 +02:00
caoyuan
6fc84b0d2e Remove six from lower-constraints.txt
it should be removed in https://review.opendev.org/#/c/687355/ but missing

Change-Id: I45351e5913801982e93bd386ffb6d6a8845f03e6
2020-05-04 13:42:31 +08:00
Stephen Finucane
df5e5db191 docs: Mention other ways of escaping '$'
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
2020-05-01 16:04:34 +00:00
Stephen Finucane
2c11e9dd82 Resolve UnboundLocalError
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
2020-05-01 16:45:04 +01:00
Zuul
579a323a43 Merge "Add release notes links to doc index" 2020-04-21 10:11:21 +00:00
Zuul
e5142bbf03 Merge "Use unittest.mock instead of third party mock" 2020-04-17 19:02:45 +00:00
Hervé Beraud
c89ddcdf40 Add release notes links to doc index
Change-Id: Ife6a9f6ff6116fda3bbb5b6a5987096f22b6f5a9
2020-04-16 15:25:56 +02:00
Sean McGinnis
76075a6d99 Mark sphinx extensions thread safe
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>
2020-04-14 11:04:14 +00:00
e5618ff363 Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ifa363aba4403932ce34a721b668ac2f878fe1ef5
2020-04-14 10:13:32 +00:00