Commit Graph

72 Commits

Author SHA1 Message Date
Pierre Riteau feabfc0155 Fix tox.ini for tox4
The skipsdist setting breaks stevedore extension loading.

Change-Id: I39dddb59d2eadd57756960ef520a643671e595b9
2023-02-24 06:23:38 +01:00
Radosław Piliszek 42e4b7639f [docs] Install blazar to generate proper docs
The blazar installation was removed in [1].
However, stevedore requires blazar to generate docs for
configuration. Currently, they are mostly empty.
Instead of removing the blazar installation, this change makes
sure that deps are installed with constraints so that blazar
installation does not bring havoc and the original issue is fixed.

[1] Ic55dba0038a2209e9fb291a604a5c1da57607e1e

Change-Id: I28d06ae31c4cf44d010e0892a094138112b08641
2022-08-03 10:40:57 +00:00
Ghanshyam Mann 7d47b5347b Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I24fd4700d59b30e4e5b3fed6c892a4f8ade7bb47
2022-04-30 15:32:04 -05:00
Zuul 66291b6e10 Merge "Skip blazar install in docs and pep8 jobs" 2022-04-15 13:17:57 +00:00
Vu Cong Tuan aa2a14a037 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I9d22be39bec67fc17841367a0ef0ac439143af6c
2022-04-14 09:23:56 +02:00
Pierre Riteau 2c3d94ce3b 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.

Change-Id: Ic55dba0038a2209e9fb291a604a5c1da57607e1e
2022-03-24 23:09:24 +01:00
Takashi Kajinami 86facea1e4 Use LOG.warning instead of deprecated LOG.warn
The LOG.warn method is deprecated[1] and the LOG.warning method should
be used instead.

[1] https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: Id847acd613c27d4e647391c346ab6d3ceced99e4
2022-01-19 17:49:31 +09:00
Ghanshyam Mann d85abc7589 Updating python testing classifier as per Yoga testing runtime
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: I9149eb5a046127057cc41f44fcd6b6784fcc61a1
2021-12-14 02:37:22 +00:00
Takashi Natsume c9a4bbdc6b Change minversion of tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace whitelist_externals with allowlist_externals option.
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Change-Id: Icf591aabde39489f539f2ca09ee59ba7c58e98a7
2021-05-18 23:06:53 +09:00
Hervé Beraud 963097ee7f Add doc/requirements
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.

[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: I0c39bb5581c120190a764b25890ba868180a59fe
2021-01-05 16:20:37 +01:00
Pierre Riteau 4f642c877f Fix lower-constraints job
* Move upper constraints from install_command to testenv deps, so it
  doesn't get inherited by the lower-constraints job. This was causing
  the wrong set of constraints to be used.
* Update MarkupSafe to 1.1.1 because of an incompatibility with recent
  setuptools: https://github.com/pallets/markupsafe/issues/116
* Update PyYAML to 5.1 to fix build on some platforms such as macOS
* Update oslo.db to 4.40.0 to fix issues with async keyword:
  https://opendev.org/openstack/oslo.db/commit/df6bf34
* Update oslo.utils to 3.37.0 for uuidsentinel:
  https://opendev.org/openstack/oslo.utils/commit/63d7649
* Update kombu to 4.2.0 to fix issues with async:
  https://github.com/celery/kombu/issues/841
* Remove kombu from requirements since we are not using it directly
* Update Flask to 1.0.2 due to various API changes
* Update oslo.service to 1.34.0 for add_timer_args:
  https://opendev.org/openstack/oslo.service/commit/750b51c
* Update oslo.context to 2.21.0 for system_scope:
  https://opendev.org/openstack/oslo.context/commit/1a40b3d
* Move oslo.context from test-requirements to requirements since we are
  also using it in non-test code
* Update keystoneauth1 to 3.13.0 for rate_semaphore:
  https://opendev.org/openstack/keystoneauth/commit/0993471
* Update alembic to 0.9.6: oslo-db 4.40.0 depends on alembic>=0.9.6

Change-Id: I4224c142d7481a79d4cc5e704436a6002b0d884f
2021-01-05 11:06:31 +01:00
wu.shiming ccf172708b Update TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
-https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://review.opendev.org/#/c/722814/

Change-Id: I95833549861a0c3500d558ca2ebb0986fadc2c06
2020-11-19 16:09:59 +00:00
Zuul ca9597b04c Merge "bump py37 to py38 in tox.ini" 2020-10-12 10:19:22 +00:00
maaoyu 4935706561 bump py37 to py38 in tox.ini
in 'victoria' cycle, we should test py38 by default.

ref:
  https://governance.openstack.org/tc/reference/runtimes/victoria.html

Change-Id: Idc9b2ef918cf15472189c4c889752d98d9857be2
2020-10-12 16:22:55 +08:00
wu.shiming 184dbcc4a3 Reuse the docs deps to benefit from constraints
Tox trying to install latest versions for building releasenotes,
which may not be supported by stable and lower branches,
so should be restricted by respective version's upper-constraints.txt
This ps to reuse upper-constraints.txt from docs deps

Change-Id: I7c7c2bd998d1a457ae1d19f42993e05370aa4e78
2020-10-12 15:42:21 +08:00
Andreas Jaeger 738f22c4a9 Fix docs publishing
Docs need to end in doc/build/html for proper publishing, fix
change I8c81e0c1944c239e460befbf886993270902ee04.

Change-Id: Iee0c8b481ecbe0187eb9acc13bf41c6363bd95ed
2020-04-14 12:51:36 +02:00
Andreas Jaeger a98989b2ef Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build; fix build warnings
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Raise oslo.utils version, 3.36.5 introduced uuidsentinel.

Change-Id: I8c81e0c1944c239e460befbf886993270902ee04
2020-04-13 18:18:44 +02:00
Andreas Jaeger 0b8d264171 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, they are not needed
to be installed at run-time.

Move hacking tests to another subdir, import hacking failed since the
subdir was called hacking as well.

Change-Id: I684f0e4be28e529ae2c9d6f4bef5bd840adc8787
2020-04-06 22:27:38 +02:00
jacky06 056b2efb14 tox: Keeping going with docs
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: I84e64e1ba60341408c400bef7c351ec0ebab2ef1
2020-01-21 10:43:32 +01:00
Tetsuro Nakamura 352893e78c [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Blazar is ready with python 3 and ok to drop python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Community-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Co-Authored-By: Ghanshyam Mann <gmann@ghanshyammann.com>

Change-Id: I69bd82f8a1156f2f2eb636ea96c439c0645cc102
2019-12-10 10:20:00 +01:00
Tetsuro Nakamura b76daf1ff6 Add max-complexity in tox pep8
This patch changes it to raise error on 'tox -epep8' when added
function is too complex.

16 is currently the most complex thing we have:
  'ManagerService.update_lease' - blazar/manager/service.py

Change-Id: Ie839351cfe8cdbc4947c4c64513ccd067e3d1cc7
2019-11-09 05:09:58 +00:00
Tetsuro Nakamura 560c8158a2 Add coverage to unit tests
We have unit tests but we didn't have the coverage report of the
unit tests. This patch adds a zuul job to report the coverage rate
of the unit tests.

It does NOT fail even if the coverage rate is too low. This is just
for reporting so far.

Change-Id: Idec8652cb92e30660546362b66115dd380c2f80e
2019-11-09 05:02:13 +00:00
Pierre Riteau 06d102c655 Build pdf doc
One of community goals is that each project should produce a single PDF
file. The pdf should be in the output of the openstack-tox-docs job.

TeX packages are required to build PDF locally, the following are
recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:

* https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
* https://etherpad.openstack.org/p/train-pdf-support-goal
* https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: If9850d8275e8c4f46b393b2cdd91c8963b9844a1
Story: 2006073
Task: 34795
2019-09-26 15:30:55 +02:00
Andreas Jaeger 7fa2da6164 Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: Icee2189e5a56e06ae01c7e3eee585e4c7a9553a6
2019-07-22 19:16:35 +02:00
Zuul 440153018e Merge "Update the constraints url" 2019-07-09 10:13:54 +00:00
dharmendra ba489b5d39 Update the constraints url
For more detail, please refer:
http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I5af911e4467f2dff329cee5b8954ddbb024a7373
2019-07-04 11:11:42 +00:00
Corey Bryant b5e445da61 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I75230c0244dc9f32eacd388c4bcc4d7b27e53f74
Story: #2005924
Task: #34199
2019-07-02 10:30:31 +00:00
Pierre Riteau 64a1d26aaf Add bindep.txt to fix unit tests
The unit tests fail since no mysqladmin command is installed. Add
bindep.txt to install the needed binaries in our CI environment.

Add also the usual bindep tox environment for developers.

Change-Id: If951f82d6610c6ee54d594d9a8985bc78e135d2b
2019-07-02 10:32:10 +01:00
Le Hou 933be7dc5d Update to opendev
Change-Id: I116dd2025399f51d557c1bcaa5adcbb508568ea6
2019-04-23 15:56:11 +08:00
Hiroaki Kobayashi 84785b7dde Change pylint requirement
pylint 2.0.0 and newer releases do not support Python 2, which breaks
Python 2 tests. This patch changes the requirement for pylint to use
version 1.9.1. The requirement is moved out of test-requirements.txt,
since pylint is not tracked in global requirements.

Change-Id: I2464ff2fc56b7fe7a92c40ec1555880f4e220479
2018-07-17 09:45:20 +00:00
Zuul 6323ed802c Merge "Register and document policy in code" 2018-07-03 02:53:06 +00:00
Hiroaki Kobayashi 99cb6b5199 Register and document policy in code
This patch moves default policy definitions from file-based maintenance
to registering them in code following OpenStack standard[1].

[1] https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Change-Id: I47afa929ebfa30e17c2dbeac31108ecbab67f067
Implements: blueprint policy-in-code
2018-06-11 17:36:13 +09:00
Doug Hellmann 36dffc58db fix tox python3 overrides
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: Ic5b3298c4ea7ebecac333418888335fc286c6489
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 16:05:57 -04:00
Doug Hellmann 514d7d087c add lower-constraints job
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.

Uncap eventlet at the same time to make the requirements match the
global list.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I3d4c66be32a7e5f1bae11fcba9491f9e26b59bb6
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-20 16:19:10 -04:00
Hiroaki Kobayashi 5b32c729e7 Add an API reference
This patch adds an API reference which follows the API documentation
guide[1].

[1] https://docs.openstack.org/doc-contrib-guide/api-guides.html

Partial-Bug: #1721489
Partial-Bug: #1703268
Change-Id: Iddcc2e2d40874895cedaca68b8ce9cafa6228deb
2018-02-02 02:17:18 +00:00
Ngo Quoc Cuong c878da337f Add log hacking rules
- [C312] Validate that logs are not translated.
- [H904] Delay string interpolations at logging calls. [1]

[1]https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages

Change-Id: I58930b6b42b00b28d80bda917834b077c380b0a0
2017-10-09 07:18:19 +00:00
Van Hung Pham 7253a0254d Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5
is available. There is no need to continue to keep these settings.

Change-Id: Iabbbc57f359e0c47d87bbc9c90e62451389a96d7
2017-06-12 16:26:48 +07:00
Masahito Muroi 68d769bf71 Migrate climate namespace to blazar
Although the Climate project was renamed to Blazar in 2014, the code has
still been using the climate namespace.

This patch moves all code to the blazar directory and allows users and
operators to use the 'blazar' command namespace. The 'climate' namespace
remains O release to allow users of Blazar time to move their own
code to the blazar namespace, but will be removed in P release
development cycle.

Change-Id: Icbe6fab1051aae4ac819982a1fa4f323cb0bf2d0
Partial-Bug: #1662734
2017-03-02 09:36:14 +00:00
Hiroaki Kobayashi c2591e89fd Whitelist rm command in tox virtual environments
When tox runs commands which are installed in the system but not in its
virtual environments, we get a warning:

   WARNING:test command found but not installed in testenv

This patch adds whitelist_externals into the testenv section of tox.ini
to avoid such warnings when running rm with tox -e docs.

Change-Id: I7144bd30483bb8068c2eda2c9e55ee9bee8be93d
2017-02-22 14:22:26 +00:00
Hiroaki Kobayashi 15bce30d4d Clean oslo-incubator code
This patch deletes the remaining oslo-incubator code. It is the last in
the series of oslo related patches. oslo-incubator code is now
completely removed from the Blazar code base.

Change-Id: Iead9cd224666dc15e14796f5454c835f293c282a
2017-02-10 13:29:27 +00:00
Masahito Muroi d4d3780e53 Add reno for release notes management
OpenStack projects use reno [1] to publish their release notes.

This patch adds a releasenotes directory with the initial layout for
building Blazar release notes. The build process is done with:

    tox -e releasenotes

[1] http://docs.openstack.org/project-team-guide/release-management.html#managing-release-notes

Change-Id: I22c6a842d16dde14c3d72010fe54e439961b3e66
Partial-Bug: #1658859
2017-02-09 11:01:40 +09:00
Hiroaki Kobayashi 65c7de0aba Use oslo-config-generator
This commit replaces the old configuration file generator from the
openstack.common.config module by oslo-config-generator [1]. It also
deletes files under tools/config which are now unused. New files are
added for the generator:

  - climate/opts.py is for collecting climate options
  - etc/climate/climate-config-generator.conf contains generator configs
  - etc/climate/README-climate.conf.txt describes how to generate a
    sample configuration file

In addition, a testenv:genconfig section is added to tox.ini and
settings for the oslo.config.opts entry point are added in setup.cfg.

[1] http://docs.openstack.org/developer/oslo.config/generator.html

Change-Id: Ifd352dee176310fd667d1523a85afd3ddf9ab5da
Closes-Bug: #1658908
2017-02-07 08:53:12 +00:00
Hiroaki Kobayashi f14ebbe153 Use oslo.i18n
This patch replaces openstack.common.gettextutils with oslo.i18n [1].
A new file 'climate/i18n.py' was added like in other projects (e.g.
nova [2]).

[1] http://docs.openstack.org/developer/oslo.i18n/usage.html
[2] https://github.com/openstack/nova/blob/master/nova/i18n.py

Change-Id: I02fe01108d3bfc48c8d9e7cf7cf5a89e5f20ef04
Closes-Bug: #1658905
2017-02-06 09:29:38 +00:00
Pierre Riteau 9f6ba312c6 Update default environment list
The Blazar code base is not yet compatible with Python 3. Having tox
environments for them is a first step towards fixing it.

Change-Id: I04441e4881eb7fe9b4c12d65392796c1020b41df
2016-12-09 11:03:22 +00:00
Tony Breeds 3c6632716e Switch from openstack.common to olso_concurrency
The aim is to remove the last user of posix-ipc so it can be removed
from global-requirements.txt.

This commit also re-generates the sample config to reflect the config
group change for 'disable_process_locking' and 'lock_path'.

Change-Id: I777424370dc02c3164803a63331a1befb8531de5
2016-12-09 08:08:05 +11:00
Tony Breeds 3b03be697a Use constraints when building tox environments
Change-Id: I5e44756ee2e7507d1247f38180fb0b61f17a5643
2016-12-09 08:07:58 +11:00
Tony Breeds 9c080a4b1a Update to newer hacking
We need to use the newer hacking library to avoid conflicts when we
enable constraints.  This in turn needs a newer pbr.

Do this as a separate change to make backporting easier.

Change-Id: I17df901a6e154dda23bf8eb883ed5ef74bf8e556
2016-12-09 08:07:58 +11:00
janonymous 5406332be0 py26 is no longer supported by Infra's CI
Python 2.6 support would be dropped by
Infra team from mitaka,CI would no longer be testing it,
so projects should drop it too.

Change-Id: Ib08718c5eec5b8b364b7e9a3deed11f7c080211c
2015-12-27 07:05:18 +00:00
Sylvain Bauza 53059527c1 Update requirements, fix oslo imports and correct tests
Since Blazar was in Winter, lots of tech debt was added.

This big change is actually trying to provide a +1 from Jenkins voting jobs.
ie.

 - fix calls to oslo_config
 - correct unittests failing due to removed assert_called()
 - remove pep8 check for verifying blazar.conf (can be readded later)
 - fix oslo_messaging imports

Not sure it's fully functional, Tempest needs to be fixed too but I
hope the gate will allow that change to pass.

Change-Id: Ib70b5b48b47626fc2613ee894d1162219417994f
2015-09-04 13:17:25 +02:00
Andreas Jaeger e84096852f Update requirements, fix testsuite
Manually update from global requirements.
Remove obsolete docutils pin.
Regenerate climate config file.
Fix testsuite for testtools change.
Workaround PYTHONHASHSEED setting in tox, disable for now so that tests
always pass.

Change-Id: I8c4a458371b28c91c5b848094e56038a16d6afc3
2014-08-26 08:09:54 +02:00