Commit Graph

48 Commits

Author SHA1 Message Date
Zuul 8aba3853ab Merge "redis: Add functional tests" 2024-02-14 13:23:58 +00:00
Zuul 882e2c5414 Merge "Ensure requirements are capped by upper constraints" 2024-02-13 15:06:19 +00:00
Takashi Kajinami 5475c35117 Ensure requirements are capped by upper constraints
Closes-Bug: #1965512
Change-Id: Iff6643f97346862573500d3dce706c3120bea64a
2024-02-11 14:17:47 +09:00
Takashi Kajinami 2318610397 Display coverage report
... for easy reference. Also make sure old data is purged.

Change-Id: I615044add4f4ceaf73f6b57c0450918343273cae
2024-02-07 03:10:35 +00:00
Takashi Kajinami 6c73ace4f7 redis: Add functional tests
This adds functional tests with redis and redis sentinel, to ensure
the current implementation can initialize clients properly.

Change-Id: I6318f6ad00d5b0ee3db1be5e8671a4c346b9daff
2024-02-04 13:20:54 +00:00
Takashi Kajinami 124d50e1bd pre-commit: Integrate bandit
We also remove these unnecessary linter dependencies from
test-requirements.txt.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: I2955b4a99c6963977272e6946058fe8134dfc45a
2024-01-30 13:41:34 +09:00
Hervé Beraud 318e95ee3f Fix issues related to tox4
Related to https://lists.openstack.org/pipermail/openstack-discuss/2023-February/032247.html

Change-Id: I52cfda7d2010c750609dd97033ba95ecea6b774c
2023-02-17 13:14:58 +00:00
Zuul eb2cd3d186 Merge "Use py3 as the default runtime for tox" 2021-04-16 11:42:28 +00:00
Daniel Bengtsson 9606e8531d 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: I8c7f9291652a58b8291c3df90571501eed43bf18
2021-02-05 13:24:26 +01:00
Hervé Beraud 0cf7b0eb65 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: I0fbe297ed98bbf7d302ce055418f35da604158a0
2021-01-21 15:34:18 +01:00
Moisés Guimarães de Medeiros 8979414153 Add pre-commit to pep8 gate
Flake8 is covered in the pre-commit hooks

Change-Id: I0fc88f0dd641b82c5a3456d687c5958d94667eb0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-29 11:16:37 +02:00
Hervé Beraud 78edaf53c6 Introducing usage of pre-commit
The main goal is to use oslo.cache to design pre-commit for oslo.* and
then spread its use widely on oslo's world.

pre-commit will be used to:
- trailing whitespace [2].
- Replaces or checks mixed line ending (mixed-line-ending) [2].
- Forbid files which have a UTF-8 byte-order
  marker (check-byte-order-marker) [2].
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs) [2].
- Check for files that contain merge conflict
  strings (check-merge-conflict) [2].
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements) [2].
- Attempts to load all yaml files to verify syntax (check-yaml) [2].
- replace tabs by space (4 by default)(remove-tabs) [3].
- Run flake8 checks (flake8) (local)

[1] https://specs.openstack.org/openstack/oslo-specs/specs/policy/contributing.html
[2] https://github.com/pre-commit/pre-commit-hooks
[3] https://github.com/Lucas-C/pre-commit-hooks

Change-Id: I9170cc31b91f8f25d66ff1b8537c55aced672785
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-10 16:27:46 +02:00
Hervé Beraud 83de99cdad Refactoring functional tests based on standard usages
Refactoring the functional tests by using the standard usages [1]
and best pratices available in the oslo.cache documentation.

The main goal of these changes is to help us to
test oslo.cache in the way that quite close to real life usages.

To test new backend now we just need to create the associated test class
dedicated to pass backend's config fixture.

These changes allow to test a new backend by:
- passing the right config to backend by using dedicated config fixture;
- adding the zuul job dedicated to manage functional tests
  against etcd backend;
- adding the right server backend to bindep.

[1] https://docs.openstack.org/oslo.cache/latest/user/usage.html

Change-Id: Iaf196d2d93225afa54e324fb830761049059926e
2020-05-28 14:34:47 +02:00
Hervé Beraud 9227352b39 Adding functional tests
This project lack of functional tests, these changes aim to introduce them.

These changes activate functional tests for oslo.cache.

They introduced:
- related ci jobs
- splits tests into functional and unit
- bindep to manage backends server

Functional tests support the following backends for now:
- etcd3gw

Co-authored-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Change-Id: I604cb542ac25fd4bfac57ea607b447ac82404b7e
2020-05-14 14:45:12 +02:00
Andreas Jaeger ddd9807fe1 Small cleanups in tox.ini
Enable warnings as errors for docs building, fix building of docs.

Use newer TOX_CONSTRAINTS instead of obsolete UPPER_CONSTRAINTS file.

Change-Id: Id3ec68ab35727a28e60fa51a343057240fe62b31
2020-05-09 14:42:28 +02:00
Andreas Jaeger fd5a13bc6a Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Blacklist:
- W504 line break after binary operator
- /oslo_cache/__init__.py:17:1: F405 'get_memoization_decorator' may be
  undefined, or defined from star imports: oslo_cache.core

Change-Id: I05bcd79e2af259df7642bf759e0e5007c2b1a34c
2020-03-30 12:01:19 +00:00
Hervé Beraud b0764baa47 trivial: Cleanup tox.ini
Update the minversion parameter to use the python -m pip to install
python packages:

https://tox.readthedocs.io/en/latest/changelog.html#id185

Inherit the jobs requirements to simplify maintainance.

Also remove pypy from tox since it's not official supported anymore
and no target exist for it.

Change-Id: I80e95eeff84d9a1a28ee3507db82ae33d2ebb937
2020-02-13 10:02:08 +01:00
Andreas Jaeger 791b9952d5 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

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 Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Ie8e737cfde8b2587ef60cd25ab746e6b04936390
2020-02-03 13:44:20 +01:00
Hervé Beraud 7316168134 tox: Trivial cleanup
Move 'basepython' to the top-level 'testenv'.

Change-Id: Ia88552f8c379eff0f1f73139c6c3f53e619013fb
2020-01-08 19:47:38 +01:00
caoyuan 29098ac5f1 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: I91ed3b79467683cfca34ef7d79afeb3e6d966f86
2019-10-24 15:01:16 +08:00
Corey Bryant a5023ba275 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: I097a6df0db8bbdd9434abe0ef7176bf0999d44ef
Story: #2005924
Task: #34234
2019-07-05 14:42:06 -04:00
Stephen Finucane 4fb6e078ee tox: Use the new hotness for constraints
Change-Id: I91e7cb43bd39d808ea6e5da7d39686b25f72f3dc
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2019-05-04 11:08:07 -06:00
Stephen Finucane 6503e2426e Avoid tox_install.sh for constraints support
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: I48f31084d595c44114391e046e5fe418c1fb787a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2019-05-04 07:02:41 +02:00
Ghanshyam Mann 79ea6a99b7 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: Ic98870c5449203556034eedd3a997afc3679efaf
2019-04-15 18:57:59 +00:00
Vieri d7eefe02e7 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: I64a99925b076268be0a472a5dacd1fdb24b26023
2018-10-09 13:32:34 +00:00
Stephen Finucane 9d94ae9077 tox: Fix typo
We shouldn't be using environment variables in this manner.

Change-Id: Iefaa71a195c6046c770f2f598199073a951df8a5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2018-07-19 11:46:12 +01:00
Vu Cong Tuan 03dc05dec3 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: I829d57082b4fb981dfab6ed0f976bb30f28b7901
2018-07-03 16:10:58 +07:00
Doug Hellmann a33bffb991 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: I5314a982b415866c5fddae8bdcf5f57add08d555
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 15:27:01 -04:00
Kenneth Giusti 57da2791ff Remove stale pip-missing-reqs tox test
pip-check-reqs tool is no longer maintained and has broken with
release 10 of pip

Refer to:
http://lists.openstack.org/pipermail/openstack-dev/2018-April/130027.html

Change-Id: I242dfb8bfd6c3e450c56367c58d38fd3d457d8bf
2018-04-30 12:58:57 -04:00
Ben Nemec 2ec8147ecc Switch pep8 job to python 3
pep8 under python 3 is more strict than under python 2, so to make
sure our projects meet the more strict standards we want to run the
pep8 jobs using python 3 by default.

Change-Id: Ief10b732be1294bf1f843291311c716b65e6b8be
2018-04-12 16:11:09 +00:00
Zuul 0013b9b064 Merge "Clean old output before new doc builds" 2018-03-29 17:25:30 +00:00
Doug Hellmann e003095b6b 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.

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

Change-Id: I281cd6451968c76cb55d9213aeb5a8da35e006a0
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-24 18:18:29 -04:00
Sean McGinnis a629c5e275 Clean old output before new doc builds
Remove the doc/build directory to make sure there are no stale
artifacts from past runs.

Change-Id: I4748f9e7787d4fe053ad095d88eec83682b4df7f
2018-03-21 16:28:39 -05:00
ChangBo Guo(gcb) e52c99825c Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I46607ac6b8448f6f6373736e54f5f75fa626538f
2018-01-04 13:16:33 +08:00
ChangBo Guo(gcb) a800709d93 add bandit to pep8 job
Add the bandit security scanner to the pep8 job.

Change-Id: Ifd1414536ed2ffa1f0c9ebf012569b5869067793
2017-11-30 10:56:52 +08:00
Davanum Srinivas e79d1ab159 etcd3 driver for oslo.cache
Support for oslo.cache to use the etcd3 grpc gateway based
HTTP API (/v3alpha) using the python-etd3gw library

Change-Id: I41ed9f6ea72641dc1db5fec45920dc41de5088bf
2017-05-26 10:55:25 -04:00
Eric Brown eeb787db74 Remove references to Python 3.4
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.

Change-Id: I3986b19a28f8ac918359abadfde2a8c3ba19f639
2017-01-09 10:10:12 -08:00
Tony Breeds 6597ef7dc7 Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove oslo.cache.

Change-Id: I61f9e86ab0fca7a2ccfa310056c3a63e069ac2e4
2016-12-20 14:37:36 +11:00
ChangBo Guo(gcb) e989c40226 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv and removes py33 venv.

Change-Id: Icd3a362b785c8071ddc338092e2f0f311522befe
2016-07-12 15:30:12 +08:00
Kirill Bespalov 3e8d5eb932 Add reno for releasenotes management
An initial patch to add reno and create a base directory for
release notes

Change-Id: I2d2ed47f68972f4b67e2ca0e49eddbb82f2af2e7
2016-05-20 17:50:21 +03:00
ChangBo Guo(gcb) 6251a1554c Trivial: ignore openstack/common in flake8 exclude list
The directory openstack/common doesn't exist any more.
So remove it from flake8 exclude list.

Another commit I46728e40e416bb532b86e2fc29361434fdee1296 fixes
this in oslo-cookiecutter.

Change-Id: I7aa53f37a21151905d9b51836fd244c832c9f6f3
2016-05-11 19:15:37 +08:00
Adam 510934fbed Delete python bytecode before every test run
Because python creates pyc|pyo files and __pycache__
directories during tox runs, certain changes in the tree,
like deletes of files, or switching branches, can create
spurious errors.

The target bytecodes for deletion are in normal directories,
but not in dot started directory.

Change-Id: I747401d1c895cc0bffc4666054fdc01264c6fd0f
2016-01-10 16:48:49 +08:00
Davanum Srinivas c8fb2e9674 Remove python 2.6 and cleanup tox.ini
* Remove support for python 2.6
* Remove skipsdist : Needs to be set only if 
  sdist is expensive
* Remove usedevelop : only needed when skipsdist 
  is set to True
* Remove install_command : We can just use the 
  default, we don't need to override
* Remove setenv : We can just use the default as
  we don't need any extra environment variables


Change-Id: I4c7772674eec553a131bb31396fb2742d505d452
2015-11-16 00:52:53 +00:00
Matt Riedemann 950a4448e3 Move optional backend dependencies into setup.cfg [extras]
The dogpile and mongo backends are optional so therefore the
dependencies that are only used for those backends are optional.

This makes use of the 'extras' capability in setuptools to declare those
as optional dependencies if you're using those backends.

If a consumer of oslo.cache wants to use the dogpile backend, for
example, then they install oslo.cache like 'sudo pip install
oslo.cache[dogpile]'.

Note that the dogpile dependency is left in requirements.txt because
the oslo_cache.core module has an unconditional import on that library.

Change-Id: I28332964d568bda405fb8d1376d50db49d288b94
2015-08-18 09:09:56 -07:00
Davanum Srinivas f692dece4d flake8 - remove unused rules and fix imports
Change-Id: Ica10101254a3daf13c4e5acc813bd02ca32d472e
2015-08-08 11:37:12 +00:00
Davanum Srinivas 45f75713a1 Add tox target to find missing requirements
Change-Id: I3bb280ad03b1e037eb8e09dac3af903c826b9c9d
2015-06-26 07:12:11 -04:00
Davanum Srinivas b6dfec2db2 fix branch name in .gitreview
Change-Id: Iec9a1545f6b9b57d75b12f22c4bd4aad54829892
2015-06-18 16:43:27 -04:00
Eric Larson 9b41e58819 Initial commit from oslo cookiecutter template 2015-04-15 11:22:01 -05:00