Commit Graph

117 Commits

Author SHA1 Message Date
Takashi Kajinami 22634362a8 Bump hacking
hacking 4.0.x is too old.

Change-Id: Ide85649ba04efcc295f4dae6f5147d351666daa3
2024-01-25 12:20:39 +09:00
Hervé Beraud ee13e53614 Bump bandit and make oslo.messaging compatible with latest rules
- Apply a timeout to requests calls to avoid uncontrolled
  resource consumption (CWE-400) [1].
- Ignore CWE 377

[1] https://cwe.mitre.org/data/definitions/400.html
[2] https://cwe.mitre.org/data/definitions/377.html

Change-Id: Ic558ad392424a25b5fd9a10749163d8427159eda
2023-05-17 11:06:34 +02:00
Sean Mooney cde68026eb update hacking pin to support flake8 3.8.3
this change updates the max version of hacking
to 4.1.0 to allow pre-commit to work with the
flake 3.8.3 release and correct one new error that was
raised as a result.

Change-Id: I3a0242208f411b430db0e7429e2c773f45b3d301
2022-05-23 14:39:56 +00: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
Ghanshyam Mann a21c96ec0e [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

Story: #2007865
Task: #40207

Closes-Bug: #1886298

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.h>

Change-Id: Id6b499239fa8b6480c5f67d460215ab458677c6d
2020-09-10 00:46:55 +00:00
Moisés Guimarães de Medeiros 6659cb8d19 Bump bandit version
This patch bumps bandit allowed version to >=1.6.0,<1.7.0 in order to
avoid the errors detailed here https://github.com/PyCQA/bandit/pull/393

Change-Id: I9235560667f664643007b8ca0be1707eab4126ad
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-25 11:47:53 +02:00
zhangboye 28d0f432ef Fix hacking min version to 3.0.1
Change-Id: I3282e4962e92bdd5a401c5b1c61fced68e8d0c8a
2020-05-22 10:20:59 +08: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
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
Kenneth Giusti 4f467fbd73 Cap Bandit below 1.6.0 and update Sphinx requirement
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.

Sphinx 2.0 no longer works on python 2.7, so we need to start
capping it there as well.

Change-Id: Ie6b379f2c99862c37891ac03c52464e07bc2b2cc
2019-05-14 10:46:32 +02: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
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
Andy Smith 5a842ae155 Switch driver to confluent-kafka client library
This patch switches the kafka python client from kafka-python to
confluent-kafka due to documented threading issues with the
kafka-python consumer and the recommendation to use multiplrocessing.
The confluent-kafka client leverages the high performance librdkafka
C client and is safe for multiple thread use.

This patch:
* switches to confluent-kafka library
* revises consumer and producer message operations
* utilizes event.tpool method for confluent-kafka blocking calls
* updates unit tests
* adds kafka specific timeouts for functional tests
* adds release note

Depends-On: Ice374dca539b8ed1b1965b75379bad5140121483
Change-Id: Idfb9fe3700d882c8285c6dc56b0620951178eba2
2018-12-04 11:25:07 -05: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
Vu Cong Tuan bcbebb7d6a Moving stestr to correct package order in test-requirements.txt
As the comment from Stephen [1],
after moving to stestr, the package should be in exact position
where testrepository is removed.

[1] https://review.openstack.org/#/c/579743/2/test-requirements.txt@16

Change-Id: Ib748e4f8ba1263f2c6475c8641c800b7df872b88
2018-07-05 08:28:33 +07: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 1231c4cbf2 Move requirements for the optional drivers (amqp1, kafka)
Move the requirements for the optional drivers to
test-requirements.txt and setup.cfg.  The default rabbitmq driver's
dependencies should be the only hard requirements for the base
package.

Leaving ZeroMQ deps unchanged for now as it will be removed in Stein

Change-Id: I19dd699ccf87e43202ccefb99258fbaa9ea17b7e
2018-04-16 10:38:07 -04:00
Doug Hellmann e67bafd526 fix lower constraints and uncap eventlet
Fix the lower constraints to match the expected values.

We will manage the eventlet version using constraints now. See the
thread starting at
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129096.html
for more details.

Change-Id: I61d5680182c53774713ee83808b1f6e7a4fba9ff
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-12 10:46:33 -04:00
OpenStack Proposal Bot 008f58335a Updated from global requirements
Change-Id: I9500a0d27953881cfad24d5542356c539353d6a7
2018-03-15 07:49:08 +00:00
OpenStack Proposal Bot 579d5fe34d Updated from global requirements
Change-Id: I289f97bc931e865feea2beb7b78456f8020da8c6
2018-01-27 18:24:28 +00:00
OpenStack Proposal Bot 95e98a98f1 Updated from global requirements
Change-Id: Ieee5fa811e69e7ae4f597ce361319758d8030bde
2018-01-24 02:16:24 +00:00
OpenStack Proposal Bot 709ee7989d Updated from global requirements
Change-Id: Id5276f0b18005af895cad852bedfdc7d8eb9b8e8
2017-11-16 11:21:28 +00:00
OpenStack Proposal Bot c2338ee325 Updated from global requirements
Change-Id: I1315cfd256afa17aaa3be3ae4a3a3f6ee5cbb564
2017-09-20 16:23:04 +00:00
OpenStack Proposal Bot 4226badc83 Updated from global requirements
Change-Id: I674e086307ef8785244a14fd4e83ffaedc927eb9
2017-09-11 21:47:08 +00:00
OpenStack Proposal Bot 38d8bdcd19 Updated from global requirements
Change-Id: Ida4133ebeb4cc0cbfbd0e8ee62a52236dc4a0256
2017-08-18 11:40:06 +00:00
OpenStack Proposal Bot 0976185b69 Updated from global requirements
Change-Id: I8e7c47dc199798a3490ebfffa0581cf74566f45b
2017-08-03 12:47:07 +00:00
Dong Ma bff426f0eb switch from oslosphinx to openstackdocstheme
Change-Id: Ic3d9b9cbef0040512e37c8e99df7bb028e344bc9
2017-07-06 15:50:11 +00:00
OpenStack Proposal Bot 58eb8ab4aa Updated from global requirements
Change-Id: I3c492ddd176882989a8a083fb560ab5c5df2452f
2017-06-27 12:20:15 +00:00
OpenStack Proposal Bot e6b225c562 Updated from global requirements
Change-Id: I9313f1d68f67c3839a261ac9661e85bbdb03b94e
2017-06-10 13:35:26 +00:00
OpenStack Proposal Bot d54efeb204 Updated from global requirements
Change-Id: I8f6d464a259ce1afc83728ddced8e8803e04f657
2017-06-06 06:10:38 +00:00
OpenStack Proposal Bot 7678848425 Updated from global requirements
Change-Id: Ic860a75be324005d072159e30d84b4c55b198242
2017-05-17 13:47:59 +00:00
OpenStack Proposal Bot 831cbf8ecd Updated from global requirements
Change-Id: Ic34a619440024e0f59f4e11fe6e248370995d5c7
2017-05-15 00:52:56 +00:00
OpenStack Proposal Bot 3fce2e0171 Updated from global requirements
Change-Id: Ia0139a39a0328725f57c1364fcd9c8bd4a1a5d0c
2017-03-07 05:51:52 +00:00
Jenkins 7f990bfe5f Merge "Remove mox3 from test-requirements.txt" 2017-03-07 03:33:06 +00:00
ricolin 84faac2040 [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: I29b64d2f8d6e3305d052562f160050fdd05c2a55
2017-03-04 14:10:30 +00:00
Brant Knudson 7728afe175 Remove mox3 from test-requirements.txt
oslo.messaging does not import mox3 directly, it uses mox3 through
oslotest.

Change-Id: Iaae0b03d2c0511d12f1ab2c8e93622dfaa6c27ce
2017-02-21 13:49:07 -06:00
OpenStack Proposal Bot 3e727ea715 Updated from global requirements
Change-Id: I1a5882d3fe0189ab3e651155681a1410c37d8a82
2017-02-16 23:17:36 +00:00
Mehdi Abaakouk 61c9e03b6b kafka: Remove testing hack for kafka
Change-Id: Ie304f1ed34156bfb60b9bc9acd4ad0aa5bad4657
2017-01-26 08:00:39 +01:00
Jenkins a4c28cc577 Merge "eventlet is no more a hard dependency" 2017-01-06 00:38:50 +00:00
Mehdi Abaakouk 31db9516c2 eventlet is no more a hard dependency
Change-Id: Ie386dea5cc4b9ff02dc2b638d2d6908c3cdad883
2017-01-04 08:10:56 +01: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
OpenStack Proposal Bot b1b3677a75 Updated from global requirements
Change-Id: I1358feb2f87821e8a18ac8b77461df57fa2a6168
2016-11-02 22:00:00 +00:00
OpenStack Proposal Bot 3efbdc703e Updated from global requirements
Change-Id: I8dced43299478078afb75c71b187b7f0607276ad
2016-10-27 12:21:15 +00:00
OpenStack Proposal Bot 96b9618228 Updated from global requirements
Change-Id: Ib121090566ec7765b52f22227e1ccfe2fe413aff
2016-10-14 05:30:16 +00:00
OpenStack Proposal Bot 15a64c6ee6 Updated from global requirements
Change-Id: I4cb1977760b9286bc7b66c0a30e602596a02637c
2016-08-20 01:02:47 +00:00
Jenkins 871754ff30 Merge "Remove discover from test-requirements" 2016-07-29 15:54:39 +00:00
OpenStack Proposal Bot 12886219a6 Updated from global requirements
Change-Id: Iae11896324f16164fd62a53c089ebd2948437098
2016-07-29 02:33:54 +00:00
OpenStack Proposal Bot c6c70aba2d Updated from global requirements
Change-Id: I3d565fabb11b45c6420ed80c81504886b53b99c7
2016-07-09 19:25:54 +00:00
Jenkins eef2bd058a Merge "tests: rabbitmq failover tests" 2016-07-04 10:55:23 +00:00
Thomas Bechtold 6967bd717d Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: Ic899f5f03e847c53c22dbe0b7ee02313648e4be8
2016-07-04 08:59:30 +02:00