Commit Graph

44 Commits

Author SHA1 Message Date
Hasan Acar 84f03c516a Fixing the gates
fix: sha256 instead of sha1 for metric_id

fix: allowlist added to .tox file
Change-Id: I0384f8e9cdae901df9403c442fce4cf1bf036968
2024-03-20 05:52:08 +00:00
Ghanshyam Mann 1ea4e21eb2 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: I710eec1feec922c6b5532dc754ab0fe3e90d3ff8
2022-04-30 20:25:05 -05:00
Hervé Beraud 37411e792a Add doc/requirements
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver [1] for the release team [2][3].

Removing specific doc requirements from test-requirements.txt.

The problem here is that this repos haven't doc/requirements.txt file
and by default in this case zuul will use the test-requirements.txt file
to pull requirements [4].

This requirements file contains extra requirements like flake8 that
collided with those allowed in our job environment and so the new pip
resolver fails to install these requirements and the job exits in error.

This project meet the conditions leading to the bug.

/!\/!\/!\
Notice that I voluntarily added the doc directory even if no docs
are generated here because zuul will try to pull this requirements from
there first and the contained requirements are needed for reno but AFAIK
the releasenotes dir is ignored by zuul. c.f [4] for further details.
/!\/!\/!\

Bump a series of lower-constraints and requirements to work with new pip
resolver, testing with steps outlined at [5]

Fix Flake8 E741 [6]

[1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html
[4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36
[5] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019285.html
[6] https://www.flake8rules.com/rules/E741.html

Change-Id: Ic1504a18a780b0f517c5aa3dd3bfb04998d42e74
2021-01-18 10:55:41 +01:00
zhangchun d557944cef bump py37 to py38 in tox.ini
in 'victoria' cycle, we should test py38 by default.
Trivial change

Change-Id: I68aa81c83f3702d50eff6d2ad46d11b194ddca52
2020-11-02 09:47:23 +00:00
Andreas Jaeger b306576d27 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, it's not needed
there.

Change-Id: Iadf750a1e6d3181b645ceccdf75cf910bc23adfd
2020-04-21 19:27:10 +02:00
Ghanshyam Mann 29c6c96d09 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

monasca-persister 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

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I628603dadcaabbe24d4d166dfb47d4413c9dbaac
2019-11-15 16:12:10 +00:00
pengyuesheng 10ddad06c3 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I1a1edcfc9a4d009a68df78d4e58ad962d837dc16
2019-09-26 13:50:18 +08:00
Corey Bryant f359521363 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: I10050c3ff90a0b7a9a905958194c06cc8db7473a
Story: #2005924
Task: #34223
2019-07-05 13:14:12 -04:00
zhulingjie 3aa33e62a3 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I66f8508ab8e29e189a16e7155caa21484486a825
2019-06-03 15:33:15 +02:00
Ghanshyam Mann d47383d138 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: I2c8a0a49f9d575cb3cb9c7eeb9bce4686c9fe223
2019-04-15 18:15:18 +00:00
Arseni Lipinski 86514d7535 Add coverage report display
Change-Id: I2a077aa1e4b2184d4c8664fa11cbce1a6ca47134
2019-04-05 13:33:43 +02:00
Thomas Bechtold fe88e8f796 Add job for releasenotes
With changeset [1], releasenotes are added to monasca-persister. To
make the release notes available, the notes can be build now with
tox ("tox -e releasenotes") and the standard zuul
job (release-notes-jobs-python3) was added to build and publish the
notes.
Also adjust elasticsearch requirement to "<3.0.0" to be inline with
the global-requirements list. This fixes:

  Requirement for package elasticsearch excludes a version not excluded
  in the global list.

[1] Ida11c326b3e6771b5ccf994205c55874db05bc5c

Change-Id: I16268797151a6b997610c8fbded4c9eeb9265597
2019-02-19 10:46:25 +00:00
Zuul e6351fbae1 Merge "Remove setup.py check from pep8 job" 2018-11-20 09:07:18 +00:00
Sean McGinnis c8a4987bbf Remove setup.py check from pep8 job
Using "python setup.py check -r -s" method of checking the package has
been deprecated with the new recommendation to build the sdist and
wheel, then running "twine check" against the output.

Luckily, there is already a job that covers this that only runs when the
README, setup.py, or setup.cfg files change, making running this in the
pep8 job redundant. This covered by the test-release-openstack-python3
that is defined in the publish-to-pypi-python3 template.

More details can be found in this mailing list post:

http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html

Change-Id: Ie86513569c5a25c2de5eca94e0479f03806a45fb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-11-06 17:10:34 +01:00
98k 6d40b54b91 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: I5cf12e8db1bbf6215ad67524b80ad52e8b9eff4d
2018-10-09 21:11:46 +00:00
Zuul 809b1693c5 Merge "fix tox python3 overrides" 2018-10-01 08:43:14 +00:00
Martin Chacon Piza 559483118b Disable B303 bandit test
Change-Id: I3e5cbfccac73e1f47859eed3d96c1acd1ac92093
2018-08-24 13:04:44 +02:00
huang.zhiping 172eb0b3da 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: Iff786d273a1511b32fbdae4b5ad647c859df349f
2018-08-15 06:36:32 +00:00
Witold Bedyk 8ec36eb94a Add check for README.rst syntax
Change-Id: Ie84446d03da4a8f357d6e52a8797bf8123705ec8
2018-08-06 17:17:23 +02:00
Charles Short 6f587b4bfc Switch to using stestr
According to Openstack summit session [1] stestr is maintained
project to which all Openstack projects should migrate.
Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Also fix the lower-requiremenst.txt to pass the gate.

Change-Id: I498282defd87c4ea16979b729600a179cdd3d01f
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-07-24 11:15:47 +00:00
Witold Bedyk 26e6d294bc Fix coverage job configuration
Set up coverage job configuration as recommended in Project Testing
Interface documentation.

https://governance.openstack.org/tc/reference/pti/python.html#coverage-jobs

Change-Id: I6db38500945a96fffab452c5be5b0ef56ff1f6b9
2018-07-24 11:26:26 +02:00
Jui Chandwaskar 6abefff1b2 Update pep8 checks
* Update max line length to 100
* Clean up codes for pep8 checks from tox.ini

Change-Id: I974c0c31dc51784506cbf54b87bc450f2334845e
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
2018-04-11 16:21:51 +02:00
Witold Bedyk c567f52f1b Clean up tox.ini
* move common commands to [testenv]
* add DB specific deps to [testenv:lower-constraints]

Change-Id: I026365b27a579e1b4d80c86149feb675ff1a75d8
2018-03-27 11:03:29 +02:00
Doug Hellmann 56da6b42f7 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: I2cafc4f53f65c5f0c3fd18eff6600cca59b585ac
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 15:49:23 -04:00
Witold Bedyk efe18cbfeb Clean up tox.ini
Depends-On: https://review.openstack.org/545832
Change-Id: I676ba1fbe4f0219f8b6dcd97c087f59b318c500d
2018-02-20 10:28:53 +00:00
Jakub Wachowski 8273de7ca6 Add support for persisting events
This change extends the persister to read OpenStack
event objects from kafka topic and then stores
them into ElasticSearch.

Story: 2001112
Task: 4843

Change-Id: I35b0db67dc088e56ad281c84fc4b50fa7a064e44
2017-11-09 08:57:17 +01:00
Adrian Czarnecki 5f168778c6 Use oslo-config-generator
To generate the sample config file, do what other OpenStack projects do
and use the oslo.config provided mechanism.

Story: 2001009
Task:  4201

Change-Id: I490de4110843f7dfd618a6a8cc8d6a4e35db65ce
2017-07-28 13:48:01 +02:00
Vu Cong Tuan 73659730ae Define extra hacking rules to ensure code quality
Enforce following codestyle rules:

* no xrange
* no LOG.warn usage (deprecated in favour of LOG.warning)
* usage of assertTrue(x) instead assertEqual(True, x)
* usage of assertIsNone(x) instead assertEqual(None, x)
* usage of assertIsNotNone(x) instead assertNotEqual(None, x)
  or assertIsNot(None, x)

Change-Id: Ib5b61816faae95937c99b1e4f651c6390b888070
2017-06-05 13:42:28 +07:00
Jenkins 825f2e9cce Merge "Fix requirements for influxdb and cassandra" 2017-05-30 05:33:23 +00:00
Dobroslaw Zybort b7184a8ddd Remove nose from test-requirements
Clean after tests properly.

Change-Id: I44c8d26dc22d0e2cb88c3dd365e4691a8af76117
2017-05-15 07:36:36 +02:00
Thomas Bechtold 659ddefdb0 Fix requirements for influxdb and cassandra
Both are optional requirements (but one must be used) so add both to the
"extras" section instead of a commented entry in requirements.txt .

Change-Id: I1f0eca2474ca275f64314a7b30b18e534afefdee
2017-05-05 10:22:14 +02:00
Witold Bedyk f1ae971c45 Add bindep.txt
Change-Id: Ia4483b6718717271088112868b560ed9d19e4799
2017-04-12 18:10:55 +02:00
Craig Bryant 7082ded836 Turn on bandit check as part of pep8
Add bandit job as part of pep8 in tox.ini

Had to fix one issue and mark two instances of try except pass as OK so that
bandit will pass

Change-Id: Ia1c96e27d1bae360c6ae0d4131665e2b712f573f
2017-02-08 11:22:18 -07:00
Laszlo Hegedus b3f9359608 Add persister.py unit tests
Add unit tests for persister.py in root directory.
Additionally:
* switched to testr as it seems to be used in many
openstack projects
* enabled coverage

Change-Id: I429ef6a900808c192ad5613c13808583d33fde24
2017-01-12 09:18:29 +00:00
gecong1973 313cbcda44 Don't include openstack/common in flake8 exclude list
There is no this directory openstack/common which was used
to keep codes from oslo-incubator, we have retired oslo-incubator.
Removing openstack/commonfrom all OpenStack code in favor of the
Oslo libraries is a project wide goal for the Ocata release. So
don't use this directory any more. We should drop it for improving
searching efficiency.

Change-Id: I65e1a75c65d44ff50c9ab0c2ff8c66faa99c227b
2016-11-25 11:09:38 +08:00
Andreas Jaeger b618c58cec Use constraints everywhere
Infra now supports constraints everywhere, remove now unused
workarounds.

For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: If8a11e1c4201570e1c1fa90ce35852704ff3bf13
2016-08-30 20:17:34 +02:00
Paula Madalina Crismaru 57e10bbcb7 Fixes H201: no 'except:' at least use 'except Exception:'
Enabled H201 on tox and changes made in relevant files.

Change-Id: I7e1f05d9f90b11ac89b371e66ed9a0010462ad01
2016-07-29 10:22:02 +03:00
Micu Matei-Marius 43194f0d72
Removed H302, H305 and H307
I unlock the hacking requirements in test-requirements.txt

Change-Id: I2a26845f16064be8c082d9cbe2e2d2bc48339314
Signed-off-by: Micu Matei-Marius <mmicu@cloudbasesolutions.com>
2016-06-30 22:22:23 +03:00
Kaiyan Sheng 3117fbad51 [monasca-persister] Constraint tox targets with upper-constraints
This review is to prepare for adding monasca-persister into openstack
global-requirements. After this project gets into global requirements,
it will be in upper-constraints.txt. If we make changes on this
specific project, we need to replace it in the upper-constraints with
source based specifier before applying it to pip install.

Change-Id: Ife8c77d41815b262300068497f7197af35ef2f5a
2016-05-20 16:40:21 -06:00
Michael James Hoppal 1f16a2763a Change tox file
Add upper-constraints and min tox version.

This will prevent taking in packages that
are greater then what is defined in the
upper-constraints

Change-Id: I4a7aea0900efa767a4a557d20d601caa9938dfeb
2016-04-20 15:55:39 -06:00
Ondřej Nový 011469ebf0 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: Ief61149c2c094b8d3aee8912a26381e42f068cfe
2015-12-11 23:05:08 +01:00
Haiwei Xu ab92eef888 Delete python bytecode before every test run
Bring over the cleaning line from run_tests.sh for the pyc files to
all the tox runs.

This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Change-Id: Ifc8df1634336fdfd298c353ad808c77f48b87b68
Closes-Bug: #1368661
2015-12-02 13:34:55 +09:00
Deklan Dieterly d3acf12034 Increase throughput of persister
Add batching to InfluxDB writes to improve throughput.

Change-Id: Ia173f55726cb11245f0bcf4580f1af8129c23aa3
2014-10-02 11:40:18 -06:00
Deklan Dieterly 3cf22f1c0d Add files for pypi.
Change-Id: Ib382ed1e15a7c124cab2124692e7d2e8e31bab1c
2014-09-30 15:21:50 -06:00