105 Commits

Author SHA1 Message Date
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
blue55
f87c349bc3 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: I54b4b950dfcd2ce5a64f38b5d5b5cbe95846a8fa
2017-06-22 11:02:49 +08:00
Kenneth Giusti
d20e89c05c Add missing {posargs:} to AMQP 1.0 functional tests
Change-Id: Ic0e340e24212c5690d65d593221fb4b89600627d
2017-05-22 13:04:41 -04:00
Jenkins
3444bbf028 Merge "tox: Build docs with Python 2.7" 2017-04-06 12:58:24 +00:00
gord chung
631ade59bc remove all kombu<4.0.0 workarounds
we lower cap at kombu>=4.0.0 so no need to support kombu3 stuff

Change-Id: I4c3bc4de6026b089fffae7ae4d34f718d45cb972
2017-03-30 12:32:58 +00:00
Stephen Finucane
06c993d550 tox: Build docs with Python 2.7
The 'list-modules' directive used in some docs does not appear to be
Python 3 compatible, yielding the following error:

  TypeError: unorderable types: NoneType() < str()

Simply use Python 2.7 until such a time as someone wants to investigate
why this happens.

Change-Id: I0be19b056e1c2272df3666626fbd17ec78017bce
2017-03-16 15:14:31 +00:00
Mehdi Abaakouk
f9cba9bd09 tests: don't run functional tests in parallel
kafka doesn't play well with //, each times a new partition/topic is
created, kafka rebalances things across brokers and messages are not
delivered at the expected time.

So this change disable the parallelizism for functional tests for kafka
only.

Change-Id: Ia497334efcd4685850ac1529a7fc38073dae7cd1
2017-02-23 10:59:00 +01:00
gord chung
5bacea1f42 support kombu4
- kombu4 wraps recoverable errors as OperationalErrors rather than
raising amqp errors
- also, raise a recoverable error and redeclare if for some reason a
message is double acknowledged... previously, this was hidden.
- ensure socket is not none
- use connect method to ensure connection

Depends-On: I9f980b51901ac31599b9651633956ad2eea6a1ac
Change-Id: I73958c8057353a2eefe1baaa7a41148193d507f7
2017-02-10 13:21:22 +00:00
ozamiatin
fa4054a51f [zmq] Use more stable configuration in voting job
Use static direct connections as voting job for zmq

Change-Id: I921317987dfccbd03b8c8c68fc1a169b6a8100c3
2017-01-16 10:13:17 +02:00
Eric Brown
ed2c1e3767 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: I2a00ead626d9eced96487ee82b5d7857126d8355
2017-01-13 18:13:32 +00:00
ozamiatin
8c5e2bd4e1 [zmq] Support py35 testenv
Change-Id: If33583d1f89e6068b232fe09f1483c979b0ef84c
2017-01-11 14:04:35 +02:00
Jenkins
74f5dd5c1c Merge "Moving driver to new kafka-python version" 2017-01-04 13:11:06 +00:00
Ilya Tyaptin
f139eb258d Moving driver to new kafka-python version
Currently Kafka driver for an oslo.messaging uses kafka-python==0.9.5
and mostly broken. This package version supports only low level Kafka
producer and consumer API which are marked as deprecated now [1]. Using
of these interfaces bring a big concern to the message processing,
because current KafkaConsumer has not any consuming coordination. This
fact causes a message duplication for the several consumers of one
topic. This behavior is specific to Ceilometer and services which read
and process notifications from other services.

New version of kafka-python allows to use async thread safe message
producers and coordinated consumers [1].

[1] http://kafka-python.readthedocs.io/en/master/changelog.html#feb-15-2016

The driver is currently experimental, python-kafka<1.0.0 API have major
issue described above that can't make the oslo.messaging driver works,
so we prefer having a working driver with a non-synced dependencies, that the
reverse.

Co-Authored-By: Mehdi Abaakouk <sileht@redhat.com>
Change-Id: I29862ed7bf56b9d8878fa8e9fb1cbd9d643908a4
2017-01-02 11:46:48 +01:00
Mehdi Abaakouk
8d2331a3b7 tox: rename zeromq target
The current zeromq target name are too long and reach the limitation
of 127 chars of the sheband of the virtualenv binary.

A target name must not be more than 22 chars to run in gate with
the tox job template.

This renames them to a shorter one.

It also creates aliases for the legacy jobs that we will remove
when the tox jobs are ready.

Change-Id: I5cbc368e7ea252f8c0c949c8e7ee3a70a560db22
2017-01-02 11:34:02 +01:00
ozamiatin
fe6cf0f8a2 [zmq] Restore static direct connections
Restore static direct connections which may be useful
for services running RPC on controllers only and talking
to agents via other means (ssh for example).

Change-Id: Icbe45978cb4a8ba5db74e5593ea7be23cba3f44e
2016-12-24 04:26:19 +02:00
Kenneth Giusti
2a9094af5d [AMQP 1.0] Setup the amqp1 test environment on ubuntu
Fixes the amqp1 functional tests so they can be run on Xenial.

Closes-Bug: 1643644
Change-Id: I3e3ee6779a60774ebffc1f45ae5564db934f8eaf
2016-12-19 14:47:04 -05:00
Jenkins
8f2852a627 Merge "Add bindep.txt/test-setup.sh to prepare the system" 2016-12-08 19:57:05 +00:00
Mehdi Abaakouk
37c0ae18dd kafka separate unit/functionnal tests
The kafka functional tests don't use our setup framework but hardcode
the kafka url.

The kafka driver is broken and currently try to be loaded with other
driver tests (and break py3 gate job).

This change remove the hardcoded stuff and uses the normal functional
tests setup to check kafka.

This avoids kafka tests to be ran on other driver tests job.

It also creates the tox target for functional tests and use
pifpaf to setup kafka.

As today, the functional test suite doesn't work all.

Change-Id: Ie6af35321905a04b38e549bf7268dd40543d9e3a
2016-12-07 18:39:36 +01:00
Mehdi Abaakouk
5fc28ec9cf Add bindep.txt/test-setup.sh to prepare the system
Change-Id: I9ac3132c082a31020dc2bf2a778fb5c4c0836c4c
2016-12-07 09:29:29 +01:00
Mehdi Abaakouk
1d09ac9077 Remove small job timeout
During the tox refactoring for the constraint stuffs [1], we pass
all target timeout from 60s to 30s, making functional tests to fail.

This change just restore the default, even the py27 job doesn't need
such small timeout.

[1] 78f113780510b741bc974c69eb9b0718cd657c1d

Change-Id: I515786a2e8b7cf8d17b5ee970b13a68f565965ea
2016-11-30 08:54:24 +01:00
Tony Breeds
78f1137805 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.messaging.

Change-Id: I8be883215f27abb58d15b85e8542cbdf32000bac
2016-11-23 20:32:32 +11:00
Gevorg Davoian
ac58423860 [zmq] Cleanup changes to zmq-specific f-tests
Change-Id: Icce92106a0a0a07a4f2d19fe8bcd7c2a6fa530c8
2016-11-07 13:51:37 +00:00
Andrew Smith
c5d142b441 [AMQP 1.0] Update setup test environment dispatch router backend
This commit updates the setup environment for the driver functional
tests to support either a qpidd (broker) or qdrouterd (router)
backend.

This patch:
* configures and runs either qpidd or qdrouterd backend
* removes support of older qpidd versions
* skips batch notification test for qdrouterd backend

Change-Id: Ifcdc187bae4a28dd29c1faa73e239d7e4d77015d
2016-08-31 13:14:36 -04:00
Jenkins
7479689e72 Merge "[zmq] Add py34 configuration for functional tests" 2016-07-13 13:09:16 +00:00
Oleksii Zamiatin
ae1123e438 [zmq] Add py34 configuration for functional tests
Change-Id: I6bd94323d88ce9123776b1359696fbc2e31933de
Closes-Bug: #1602234
2016-07-12 17:01:39 +00:00
ChangBo Guo(gcb)
8e778658e5 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.

Change-Id: I8871f4e17ab806c00661d0c960a216d0a3fc5449
2016-07-12 16:35:36 +08:00
Kenneth Giusti
96438a3e1f Add Python 3.4 functional tests for AMQP 1.0 driver
Change-Id: Ieead11641df3e711555420517e9668258a79410b
Closes-Bug: #1598209
2016-07-06 09:50:57 -04:00
Jenkins
68556b36ee Merge "[zmq] Additional configurations for f-tests" 2016-07-05 16:04:39 +00:00
Mehdi Abaakouk
35146383d0 tests: allow to override the functionnal tests suite args
Change-Id: Ia958b3812be7c51a07734081542f14452c5de658
2016-07-04 17:54:35 +00:00
Oleksii Zamiatin
2b50ea5a30 [zmq] Additional configurations for f-tests
Extend functional testing to cover all zmq deployment configurations.

Change-Id: I03a1bb27a4cca429405a19e9de3ba593bbf1db63
2016-07-04 12:44:44 +03:00
Mehdi Abaakouk
865bfec975 tests: rabbitmq failover tests
This leverages the pifpaf library to exercice
rabbitmq failover.

Change-Id: Ic6acc5d006344e08c219724e488fc9222786d849
2016-07-04 00:24:13 +00:00
Kirill Bespalov
0991a696ca Add reno for releasenotes management
An initial patch to add reno and create a base directory for
release notes

Change-Id: If393d865f3f054379a713d0e9f905d43b2faeccb
2016-05-19 17:14:31 +03:00
Jenkins
5ad18f73c5 Merge "Fix typo passend should be passenv" 2016-03-22 00:21:04 +00:00
Davanum Srinivas
2fb5ad9b36 Fix typo passend should be passenv
Looks like a typo. It should be passenv as mentioned in
tox docs:
https://testrun.org/tox/latest/config.html

Change-Id: I14a18ec5b6c53ad4931b144ef66916563047cde6
2016-03-21 17:36:15 -04:00