Commit Graph

544 Commits

Author SHA1 Message Date
Hasan Acar 2f71e5688d Adding docker publish as a periodic job
Change-Id: I593d0f10b24bc17d3a65927bdb4ae81b2c0acb8a
2024-02-22 12:54:51 +00:00
Hasan Acar fe601fa51b fix: Upgrade librdkafka
fix: libressl3.4 packages removed

fix: publish docker image jobs added

Change-Id: Ia8fccfb28b1c95d8ffdb8ca40fba9cc586e5ce7d
2024-02-08 16:12:23 +00:00
Dr. Jens Harbott cdc03f9ae5 Fix zuul config error
Drop non-existing jobs:

- monasca-tempest-java-cassandra
- monascalog-tempest

Change-Id: Ia82ba875fe47bd6ce43035ca0d3352c5115dd988
2023-08-12 22:46:54 +02:00
Elod Illes 1ca4152373 Fix deprecated zuul queue syntax
Zuul deprecated (and now removed) declaring shared queues at a pipeline
level [1]. This patch fixes the syntax to make the gate work again for
monasca-common.

[1] https://lists.openstack.org/pipermail/openstack-discuss/2022-May/028603.html

Change-Id: Id9c0956d4800f01dadfece02638bc4fcc9ef1e8a
2023-02-17 20:20:16 +01:00
Ghanshyam Mann f290882658 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I011e9d6e0787dae20607040bc08e7335ff306862
2022-05-03 11:26:13 +00:00
Martin Chacon Piza 43c5cdeab9 Remove temporarily docker Zuul-jobs
- build-monasca-common-docker-base-image
- publish-monasca-common-docker-base-image

Change-Id: I6aa0a059dde848dea5010c68af43bbfe1b8c338b
2022-05-02 17:28:12 +02:00
OpenStack Release Bot 90c9b2d130 Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

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

Change-Id: I0ca9152c10a8d2baffb024487b874c1177007dff
2022-04-06 09:19:38 +00:00
Martin Chacon Piza 873cbf82f6 Rename tenant with project_id
Since oslo.context=4.0.0 Feb 3, 2022  the deprecated argument
tenant was removed [1]

- Bump docutils in lower-constraints and test-requirements

[1] f4cbe4c296

Change-Id: I703d49f5e5870bf45030fc5502749e197aae3a3b
2022-04-06 11:04:08 +02:00
Martin Chacon Piza ffce75af6c Update Monasca Base Image
- Bump base image to python:3.8-alpine3.15
- Add Rust compiler and its dependency Cairo
- Bump librdkafka to v1.8.0
- Removed env variable CRYPTOGRAPHY_DONT_BUILD_RUST=1 since
  new Cryptography requires Rust.

Change-Id: Iacb7d3b5eeb1540647c189d76cf5aa3dee9706b5
2022-01-25 18:30:14 +01:00
Martin Chacon Piza d6ebd62a6d Bump librdkafka dependencies
libressl3.4-libcrypto
libressl3.4-libssl

These libraries were bumped in [1] on 11.12.2021

[1] http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/

Change-Id: I135d909b38b3907df124a86234fabb0525713d2c
2022-01-18 17:25:07 +01:00
OpenStack Release Bot c3a3f23005 Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

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

Change-Id: Iac0dcd0f3c1623e4aa65e36b4ae7bf9f90aff470
2021-09-10 14:32:01 +00:00
Martin Chacon Piza f5abe9d82e Bump librdkafka dependencies
libressl3.3-libcrypto
libressl3.3-libssl

These libraries were bumped in [1] on 07.06.2021

[1] http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/

Change-Id: I7242ecc4518683571d3553c1cc8dfbbf93de369c
2021-06-08 16:19:41 +02:00
Martin Chacon Piza 844db67a91 Fix Docker build
The default nodeset was just changed to focal [1], which in the absence
of the python-is-python3 package doesn't provide a python binary.

[1] https://review.opendev.org/c/opendev/base-jobs/+/789098

Change-Id: I43e86ff631034bc6b35fedbc30b72282b5d3b7c8
2021-06-07 16:45:01 +02:00
Martin Chacon Piza db200fd98b Bump sublibraries
libressl3.2-libcrypto
libressl3.2-libssl

These libraries were bumped in [1] on 19.03.2021

[1] http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/

Change-Id: I361d5137336f6833d4ed9033b4a7f818a1cd80b5
2021-03-24 12:37:24 +01:00
OpenStack Release Bot 76826b4025 Add Python3 xena unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for xena.

See also the PTI in governance [1].

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

Change-Id: I7faa2bdba6191f5ae8f2570573c11f89cb260997
2021-03-18 11:14:00 +00:00
Martin Chacon Piza 9aa47afe5d Fix zuul publish docker image job
Add tag to docker push command with specific branch name

Change-Id: Ie4b135c456333cd8a98cfb1d5231351786d1dd86
2021-02-24 11:48:20 +01:00
Martin Chacon Piza ccae320767 Use C compiler to build cryptography
Building wheel from cryptography>=3.4 uses by default rust compiler
but version 3.4.x keeps compatibility with C compiler by setting
the env variable CRYPTOGRAPHY_DONT_BUILD_RUST=1 [1]

[1] https://mail.python.org/pipermail/cryptography-dev/2020-December/000998.html

Change-Id: I41f47e02aef73bd9ebf6d6a46e8c212b9a268d73
2021-02-23 20:53:57 +01:00
Martin Chacon Piza f59a2f296e Bump librdkafka to 1.6.0
Package confluent-kafka-python v1.6.0 requires librdkafka >= 1.6.0

Change-Id: Iea1d4fa42159984efff262d459292e5c6f941504
2021-02-09 16:46:24 +01:00
Ghanshyam Mann c491b34888 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ibb26169656785330e7d86a362fd110222fb63a07
2021-02-02 17:44:35 +00:00
Martin Chacon Piza 99f6cf2b1c Fix zuul publish docker image job
Add tag to docker push command

Change-Id: I531c7349f51248bbc6050755d821f444d75141a5
2021-02-02 15:41:54 +01:00
Zuul e495a567b0 Merge "Add py38 in setup metadata" 2020-12-07 12:07:24 +00:00
wangzihao 6ffab589a4 Remove six
Remove six Replace the following items with Python 3 style code.
- six.PY3
- six.xrange
- six.string_types
- six.binary_type
- six.iteritems
- six.unichr
- six.wraps
- six.get_function_code
- six.PY2
- six.b
- six.moves.range
- reraise
- six.text_type

Story: 2008305
Task: 41301
Change-Id: Idf64154a013b53c7db771a25f1c63c1295e354e6
2020-11-23 15:20:59 +08:00
wangzihao 429f515ba7 Add py38 in setup metadata
Change-Id: Id2a9678b311af32bc6ec9a9832ce423042868e35
2020-11-23 10:12:42 +08:00
zhangchun fd7c3bf707 bump py37 to py38 in tox.ini
in 'victoria' cycle, we should test py38 by default.
Trivial change

Change-Id: Iaabf93603e41decbdc8350df7f76a2491c0f7813
2020-11-02 13:45:12 +00:00
OpenStack Release Bot e4861ac15b Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

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

Change-Id: I775741e360ac90cfe00b19006bfdad81f46f3df1
2020-10-15 11:36:09 +00:00
Martin Chacon Piza e8a953ba3a [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).

-Bump the requirements and lower constraints for required deps
which added python3.8 support in their later version.

-It also fixes one unit tests to handle PEP479 being enabled for all code
in Python 3.8 [2].

Story: #2007865
Task: #40197

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.html
[2] https://stackoverflow.com/questions/51700960/runtimeerror-generator-raised-stopiteration-every-time-i-try-to-run-app

Change-Id: If67bbfe8a2db19fa8f3437f746ca7f4d04487447
2020-10-13 16:09:31 +02:00
Hervé Beraud 3a7030d168 drop mock from lower-constraints
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we don't need it
in lower-constraints.

These changes will help us to drop `mock` from openstack/requirements

Change-Id: Ie7239e6651feb358cd0f00fe2709452ebeb3a811
2020-06-09 01:24:15 +02:00
Hervé Beraud a1593cd0ff Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I691d3717750c7ba5084cac98fad5be22170732db
2020-06-02 20:25:01 +02:00
Zuul fe0be761de Merge "Remove .testr.conf" 2020-05-26 19:59:22 +00:00
Martin Chacon Piza 5390345146 Bump sublibraries
libressl3.1-libcrypto
libressl3.1-libssl

Change-Id: If2207d29dfe114beb6787bd891c0d4e92a917101
2020-05-26 12:06:16 +02:00
Witek Bedyk de460c8946 Add CONTRIBUTING.rst
Change-Id: I9aafe78878630c0437ca7cac418d87c7e27b1150
2020-05-19 16:16:52 +02:00
lidong 712d27b394 Update the outdated link
Change-Id: Id7b8f11058e113103113603ec1f3bdabef4ca6ae
2020-05-19 15:08:34 +08:00
Masayuki Igawa 93345c6fc9
Remove .testr.conf
This commit removes .testr.conf since this repo already has
.stestr.conf. We just need .stestr.conf instead of .testr.conf.

Change-Id: I22570efeec854d4b26ce10c6820a96349c1b625a
2020-05-19 15:47:08 +09:00
Ghanshyam Mann 850710c46f Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: I931ffdb03ea55047439d019ccb8a1493b56f2569
2020-05-12 19:29:44 -05:00
Andreas Jaeger 5b8da9870d Switch to Victoria tests
This repo has been using train tests and thus was missed by the bot to
update from ussuri to victoria, update manually.

See also the PTI in governance [1].

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

Change-Id: Ibb6e2d776de1df08fd53a3e254b70728167a87bb
2020-05-09 14:18:19 +02:00
Martin Chacon Piza 1c20a58b22 Bump librdkafka to 1.4.0
Package confluent-kafka-python v1.4.1 requires librdkafka >= 1.4.0 [1]
Bump sublibraries libressl3.0-libcrypto libressl3.0-libssl

[1] https://github.com/confluentinc/confluent-kafka-python/tree/v1.4.1#prerequisites

Change-Id: I005c16dc2c2c11548d4cdce023599fb9be03a52f
2020-05-04 18:42:14 +02:00
Andreas Jaeger 2ebc766534 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: Ia16e8cbccf7b38be8909aa94e66c04b99f200b89
2020-04-24 12:41:05 +00:00
Zuul 92652f1d3b Merge "Use unittest.mock instead of third party mock" 2020-04-23 12:50:44 +00:00
Sean McGinnis f38a954fd2
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ie775b99cdb645f072c0a22fa1a1a47448970b103
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:54:48 -05:00
Andreas Jaeger 070bd04aea Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg:
  * Wheel is not needed for python 3 only repo
  * Some other sections are obsolete
- Update classifiers

Change-Id: If1bd950d159a583d912d13e73113dae7f577e8eb
2020-04-05 09:51:28 +02:00
Martin Chacon Piza 0f4e2bc5df Replacing ujson with simplejson
- http://lists.openstack.org/pipermail/openstack-discuss/2020-January/012285.html

Change-Id: Ic18f8cf4addfedd9055999ec685e81140ffda32d
2020-04-02 15:44:25 +02:00
liushuobj 0447757f4e fix a typo
Change-Id: I4e986887602ae17b1c90e49ada4cfe95f6cd15ae
2019-12-27 10:08:11 +08:00
Zuul 6ff39f3a4d Merge "Enable running unit tests in py37 environment" 2019-12-10 20:18:57 +00:00
Zuul aecc0f0230 Merge "Allow passing config options to Kafka producer" 2019-12-10 10:48:32 +00:00
Witek Bedyk 231f3b4760 Enable running unit tests in py37 environment
Until now no unit tests have been executed in py37 environment. This
change fixes tox configuration to enable running these tests.

It also fixes two unit tests to handle PEP479 being enabled for all code
in Python 3.7 [1, 2].

[1] https://docs.python.org/3/whatsnew/3.7.html#changes-in-python-behavior
[2] https://stackoverflow.com/questions/51700960/runtimeerror-generator-raised-stopiteration-every-time-i-try-to-run-app

Change-Id: I7fcf30d848efb8dc4cc6ca19056868aa6127cf60
2019-11-27 09:19:36 +01:00
Witek Bedyk eb8e6ff7e2 Allow passing config options to Kafka producer
The change allows passing supported options as dictionary to create a
Kafka producer object.

Change-Id: I7627a8caa2d6bb9c7789df143e72a4085060b164
Story: 2006059
Task: 37531
2019-11-18 11:06:12 +01:00
Ghanshyam Mann b70afb9bf6 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

monasca-common is ready with python 3 and ok to drop the
python 2.7 support.

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: Ibf95dffdebe47c8ea4a8a8a666ac6f66d9b4c774
2019-11-16 16:54:42 +00:00
Witek Bedyk 66754b1a4a Avoid value decoding in Kafka delivery report
In Python 2 Kafka message value gets implicitly converted to unicode in
delivery_report function. In case the message value already contains
unicode characters the convertion fails with UnicodeDecodeError.

This case can be reproduced when trying to run:

  u'goose: {}'.format('gęś')

This commit fixes the debug message and avoids implicit type convertion.

Change-Id: Ia9463cd4e9f92cdf18b092abd2cf676aa4966679
Story: 2006503
Task: 36481
2019-09-12 14:08:12 +02:00
Dobroslaw Zybort dd4b19ad46 Fix building librdkafka from source in Docker
Change-Id: If7f6eb1d8fc3dd12fdb57e5cd9554f554bd9b958
2019-08-21 15:11:22 +02:00
zhangjianweibj e9efa3be0e Install librdkafka from source code
apk install librdkafka-dev success,but loading shared library
librdkafka.so.1 failed.

Change-Id: I3bf24002aab3d708d045704214a66f5f47863d5d
Task: 36048
Story: 2006317
2019-08-20 08:42:51 +08:00