'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>
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>
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
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>
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
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
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
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
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
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
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
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
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>
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
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>
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
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
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
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
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