Commit Graph

138 Commits

Author SHA1 Message Date
Takashi Kajinami 795185d43c Display coverage report
... for easy reference. Also make sure old data is purged.

Change-Id: Ic017107ae15fa33cdfd4866f812af9a583a32f14
2024-02-07 12:17:40 +09:00
Hervé Beraud 6e7a5725fa cleanup amqp1 scenarios remnants setups
Change-Id: I9e042732b1d512bb4bebff7a72ea2063a25d2926
2024-01-16 22:17:57 +09:00
Stephen Finucane d16cddd822 Move integration jobs to Ubuntu 22.04 (Jammy)
I noticed the confluent-kafka package isn't compatible with the version
of librdkafka-dev provided on Jammy [1][2]. Thankfully they provide a
binary wheel though.

[1] https://github.com/confluentinc/confluent-kafka-python/blob/v1.9.2/src/confluent_kafka/src/confluent_kafka.h#L59
[2] https://packages.ubuntu.com/jammy/librdkafka-dev

Change-Id: If55f246d9d2a990f2389d14d7bda22a82d9bb43c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-10-13 17:31:11 +09:00
Stephen Finucane 7505316902 tox cleanups
'skip_basepython_conflicts' has been the cause of a couple of bugs in
tox 4 and there is talk of it going away. Remove it and fix up a few
other issues in the tox.ini file.

Change-Id: Ic19c896af2ab0cf3570c43e8ceb8cba64fb45cdd
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-01-18 17:00:10 +00:00
yangyawei 3e589edd90 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: If129b56be47952d018b9f6024d2a192950c1a974
2021-06-07 16:58:52 +08:00
Daniel Bengtsson e52dc2accf Remove lower constraints.
Remove the lower constraints file and the
tox environment for lower constraints.

Change-Id: Iefa00bee6f67e9e82f0c703a7aff144c0dcbe1ec
2021-02-05 13:08:03 +01:00
Zuul 38a06028f2 Merge "Move jobs to py38" 2021-02-03 16:52:10 +00:00
Zuul 0e7ac7d29e Merge "Use py3 as the default runtime for tox" 2021-01-18 16:20:22 +00:00
Hervé Beraud f16892ea48 Move jobs to py38
Change-Id: I5e7e3f84519770e39754338ea4968fa6cd3ee6f6
2020-12-16 11:05:26 +01:00
Hervé Beraud 7a83dcd588 Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://review.opendev.org/#/c/722814/
[2] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: I93bab5b1e77e720cbf308a97a9605a9dc98025a0
2020-11-04 10:49:02 +01:00
Hervé Beraud 672c00a67d 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: I2c517401aa1ae464e6563800ecb0a459076655b3
2020-11-04 10:02:47 +01:00
Hervé Beraud a997f09e5b 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: Ibd0c3d64fdc5c293d9d676d33eab828d9fde971f
Co-authored-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-22 12:35:37 +02:00
Andreas Jaeger e44c988306 Remove six usage
Remove six, the python 2/3 compatibility library. It's not needed
anymore since the repo is python3 only.

Remove a now unneeded hacking test.

Change-Id: I40522c4accb4aaf8115d11fee8b081e2d991cb4d
2020-05-11 10:21:58 +02:00
Sean McGinnis a7b9c70f5c
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I1992bad2ee6bffade2f937cc0d8dc6ae800f4159
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:49 -05:00
Andreas Jaeger 7f638bb493 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Update local hacking check for new flake8 version.

Blacklist:
W504 line break after binary operator

Fix:
E741 ambiguous variable name
E117 over-indented
E305 expected 2 blank lines after class or function definition, found 1
F841 local variable 'e' is assigned to but never used
W605 invalid escape sequence '\.'

Change-Id: I99d574ca6569f1f177d2c5ce1011f269f4343619
2020-03-30 13:49:29 +00:00
Andy Smith ab78c8e3dd Setup backend scenarios for functional tests
This patchset introduces scenarios for the functional tests to unify the
setup and configuration of alternate messaging backends for RPC and
Notifications. The scenarios are defined to reduce redundancy in
the testing of backends and to demonstrate functional correctness
across driver combinations.

Current driver support:
rabbit - RPC, Notify
amqp   - RPC
kafka  - Notify

                  RPC       Notify
               ---------  ----------
scenario01       rabbit     rabbit
scenario02       rabbit     kafka
scenario03        amqp      rabbit
scenario04        amqp      kafka

It is anticipated that additional scenarios will be defined as new
drivers are introduced and/or new messaging intermediarites are supported.

Note: The removal of python2 jobs are also included patch

Change-Id: I0f86416623a0b718516147f0660b4df2b74cf867
2020-02-05 08:00:56 -05:00
Hervé Beraud 32a1b6e948 [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: I15cc79159b603e232e442e202c78d6c56dc73252
2020-02-03 18:35:08 +01:00
Hervé Beraud cc6cf12c3d tox: Trivial cleanup
Move 'basepython' to the top-level 'testenv'.

Change-Id: I13e72ec6cbd006ca6eccfe21f2a0584e86a52669
2020-01-08 19:59:34 +01:00
caoyuan 1e7a0c6fbb 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: If9885a1f064226909181d8b69241eb814deb2105
2019-10-24 14:21:22 +08:00
pengyuesheng b72922670f Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Ie0b54914f5ca45f4888eb1cf8faac36f87e45535
2019-09-23 16:20:21 +08:00
Corey Bryant 1c31abc7bc 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: I699a3ee210c4b45018566b520eaf641e0e582362
Story: #2005924
Task: #34234
2019-07-05 14:47:53 -04:00
Zuul 40c25c2bde Merge "Remove log translation and i18n" 2019-05-04 22:31:13 +00:00
jacky06 9b7bcbda2f Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ib4a523adf3275a8727d5a4f2a149e163a81be3cc
2019-04-26 10:31:26 +08:00
Hervé Beraud 4f385720d7 Remove log translation and i18n
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

Change-Id: I9ddb6595fc52e46ed8844e39d2fa71029c90b65c
Closes-Bug: #1674567
2019-04-24 11:55:38 +02:00
Zuul d4873f983b Merge "Dropping the py35 testing" 2019-04-18 01:14:36 +00:00
Ghanshyam Mann 0d4f1d64b6 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: I1874f96f78cb403e6f3a56a49cb83df40d531f8d
2019-04-15 01:14:11 +00:00
Andy Smith 8897e1584f Update messaging intermediaries for amqp1 tests
This patch messaging intermediaries used for the amqp1 driver
test. The combination of the apache qpid-dispatch-router (qdrouterd)
with an attached apache artemis broker is used in place of the qpidd
broker. The qdrouterd will directly message oslo.messaging rpc
communications and will link route oslo.messaging notify
communications to the artemis broker (e.g. for persistence).

This patch:
* updates the dependencies
* updates the test environment setup
* uses the pifpaf drivers to create servers

Change-Id: I9fb56450346fca84bc1573fa5e9b6fe81c14e33a
2019-03-11 08:47:46 -04:00
Zuul 472d483942 Merge "Change python3.5 job to python3.7 job on Stein+" 2019-02-22 01:23:52 +00:00
Charles Short fa2a3e4fcc Change python3.5 job to python3.7 job on Stein+
python3.5 was the only supported python3 version on Xenial, now that we have
Bionic Beaver nodes that support python3.7, lets switch to testing with
python3.7 in addition with python3.6 in Stein and beyond.
See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135632.html

Change-Id: I3335ccb01667d22a181d99d4d53d7356005d72ad
Signed-off-by: Charles Short <chucks@redhat.com>
Story: #2004073
Task: #27440
2019-02-14 10:28:20 +00:00
ZhijunWei cb902e5aff Update hacking version
update the hacking to latest, duo to[1]

[1]: https://github.com/openstack/oslo.messaging/blob/master/HACKING.rst

Change-Id: I1ee7387272690f0de0d7b1937d7c2b0ee404063c
2019-01-21 19:45:42 -05:00
Zuul 90a5bd5077 Merge "Remove the deprecated ZeroMQ driver" 2018-08-29 14:08:20 +00:00
Andy Smith f2fd8d4375 Remove the deprecated ZeroMQ driver
Users of the oslo.messaging RPC communications service must use
the rabbit ("rabbit://...") or AMQP 1.0 ("amqp://...") drivers.

Change-Id: If3474142f1fe99d41d7b4466061ed0e23ca38549
Closes-Bug: 1789259
2018-08-28 16:00:50 -04:00
Kenneth Giusti d8b0d48055 Fix the coverage tox tests
Change-Id: I45f7269c95807e7a804f116c2d1aed6baf9f46e2
2018-08-20 15:20:47 -04:00
Zuul 9e61ad5405 Merge "Fix the bandit security linter test" 2018-07-04 18:04:50 +00:00
Vu Cong Tuan 7e5be7c54c 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: I89b785c91738ab62e3f42da42c431b9df8ccfd70
2018-07-04 08:33:49 +07:00
Kenneth Giusti ae9e673887 Fix the bandit security linter test
Add the bandit security linter test to the pep8 target

Change-Id: I9324b9d9df77fd05c2e10bb48d7ccf8b4c634525
2018-07-02 13:16:11 -04:00
Doug Hellmann 87cafdf804 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: I02ef155ef47a5eaddf9de902ad3608bee677fbcf
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-07 17:40:38 -04:00
Kenneth Giusti f08cd5534f Remove stale pip-missing-reqs tox test.
pip_check_reqs tool is no longer maintained and has broken with
release 10 of pip

Change-Id: Ic4b42ed54d4d276c65ad2fa37f316c43d9c71ffb
2018-04-30 11:55:12 -04:00
Andrew Smith 5f4755b92b Add kafka for python 3 functional test
Change-Id: I743cd09e3450fac215ff65db37c3fe53e2e43601
2018-04-17 14:05:20 -04:00
Kenneth Giusti 629d449bbb set default python to python3
Set the default python to python3 except for the py27 specific test
environments. Set Python 2.7 as the python version to use for these
tests.

Temporarily ignore optional driver requirements for now. This will be
addressed in a later update.

Change-Id: Iea8e48b72234bb9a580f2345396cf60fe2022618
2018-04-13 11:02:23 -04:00
Doug Hellmann 7326192b96 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: I8991c2ab1c880c401fd807e38565258403af05e8
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-26 11:36:11 -04:00
Kenneth Giusti 222a939361 Remove the deprecated Pika driver
It is recommended that all users of the Pika driver transition to
using the Rabbit driver instead.  Typically this is done by changing
the prefix of the transport_url configuration option from "pika://..."
to "rabbit://...".  There are no changes required to the RabbitMQ
server configuration.

Change-Id: I52ea5ccb7e7c247abd95e2d8d50dac4c4ad11246
Closes-Bug: #1744741
2018-03-21 10:58:23 -04:00
Yaguo Zhou 42f5e1fe8c Switch from pip_missing_reqs to pip_check_reqs
The pip_missing_reqs tool is abandoned and now incompatible with
recent versions of pip. It has been supplanted by the pip_check_reqs
tool which provides the same pip-missing-reqs entrypoint (plus some
others), effectively renamed.

This is the same as https://review.openstack.org/#/c/453208/ and
the commit message above is copied here.

Change-Id: Ibd02fda9c3f96034c96c7bf4abb9248219e0662c
2018-02-14 17:08:46 +08:00
Sean McGinnis 1cbe9361cb 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: I39b9806013a0912b27c0523dfc2b713b3105bdf1
2018-01-08 12:11:54 -06:00
Andrew Smith 1ccdccddaa Add kafka driver vhost emulation
Emulate vhost support by adding the virtual host name to the
topic created on the kafka server. Also, update connection
management for producer/consumer.

This patch:
* updates target to topic generation
* add consumer and producer connection classes
* remove connection pool
* update driver test

Change-Id: Idd164444c04e9f465a43ee909af840a41bb090c0
2017-12-27 12:57:39 -05:00
Zuul 7e46a5fa9d Merge "Update kafka functional test" 2017-12-19 06:16:50 +00:00
Kenneth Giusti c7cc6d0742 Create doc/requirements.txt
For compliance with the Project Testing Interface as described in:

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

Refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-November/124815.html

Change-Id: I3d8c70f66931c15247b530ff7e1c89bfc753446f
2017-12-18 15:09:20 -05:00
Andrew Smith 3afc3a0a1d Update kafka functional test
This patch addresses a number of issues that prevented the functional
tests from running. The functional tests now execute and can complete
succesfully. At times, the test will fail (noticiably in CI) indicating
an underlying issue with consumer interaction with the kafka server.

It would be beneficial to merge this patch as it provides repeatability
and visibility for driver-kafka server integration to facilitate
additional debugging and testing.

This patch:

* removes use of deprecated get_transport
* override consumer_group for each test
* changed to synchronous send
* update to kafka 1.0.0 server

Depends-On: Ib552152e841a9fc0bffdcb7c3f7bc75613d0ed62
Change-Id: I7009a3b96ee250c177c10f5121eb73d908747a52
2017-12-16 14:41:03 -05:00
Andreas Jaeger d68b53f056 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: Ifaaf656effff20ef08214f111645a3b5fc8b4d28
2017-12-02 17:01:55 +00:00
Kenneth Giusti e1a3da9443 Move legacy zuulv3 tests into oslo.messaging repo
Next step will be to re-write these for zuulv3

Change-Id: I2f6a8432e037f75d6abee3bc977933a310a4a2c7
2017-10-17 16:01:29 -04:00