The current usage has no useful effect because only a single target
is using the "shared" env. In addition, reusing a single environments
for multiple targets does not work in recent tox.
Change-Id: Ib43ad52b772833f03842e8409a06f84d02d04ff4
... to resolve the following ValueError.
```
ValueError: 'string' is not callable
```
The I202 test is disabled because multiple files need updates. It may
be enabled later once all the warnings are addressed.
Fixed E721 test errors which appears 4 times.
E721 do not compare types, for exact checks use `is` / `is not`, for
instance checks use `isinstance()`
Change-Id: I68880b83c8a555ed30c3ce18b73ae27b8db34dc8
Mark all sqlachemy deprecation warnings as 'error', but ignore each
known deprecation at the moment.
Each followup commit will remove one or more 'ignored' deprecation
warnings and will also fix them.
Change-Id: Iedcfc826962ad28446e91d44eea3071c11d16973
- scripts were not in allowlist for pep8 environment
- skipsdist setting breaks the docs environment
Change-Id: I5ac930e0d3928bb8acba4212dfff25f788acd442
This change introduces the config file for the oslo-config-generator
command, so that users can easily generate octavia.conf.example without
tox.
Note this change adds parameters of oslo.policy and oslo.middleware
which were missing previously.
Change-Id: I5ea921cf8d63b28c5143f95dbb47802d5018d7a4
Update Python base version from 3.6 to 3.8. For Zed the minimum
Python runtime versions are Python 3.8 and 3.9 [1]. As a third
Python version I also added 3.10 already.
Removed ThreadedHTTPServer and replaced it with ThreadingHTTPServer from
standard library, which is new in Python 3.7.
[1]: https://governance.openstack.org/tc/reference/runtimes/zed.html
Change-Id: I035c569b4feaa23b00c0cad50c36aaecf06f7848
Remove test-requirements.txt from docs dependencies, add hacking in
doc/requirements. It should reduce the duration of the docs job.
Removed some comments that disabled consider-using-with in pylint,
most of the flagged code is now considered as false positive.
Change-Id: Ib550542820163be2bbef97df7b090834a6b6dccd
pip-check-reqs fails with latest pip, cap both packages until
https://github.com/r1chardj0n3s/pip-check-reqs/issues/66 is fixed.
Co-Authored-By: Gregory Thiemonge <gthiemon@redhat.com>
Change-Id: I6ae2740557f0e62b6805e5dadd025e7bf44ec57d
The new flake8 includes check H216 to encourage the use of unittest.mock
instead of third party mock modules. Octavia had a hacking check, O349,
for the same purpose. Unfortunately, H216 is flagging that check as
an improper use.
This patch removes O349, in favor of H216, for the Octaiva hacking checks.
Change-Id: I5c11c892ca1184624d6d8e111f69ec30cab2a0d8
There were a few unit test files that didn't match their
code counterparts, so were a little hard to find. Moved
things around to line-up better, leaving only a handful
of exceptions to ignore. Added a test script to check
things so it won't happen again, copied from Neutron.
No actual code was changed, files were just moved around.
Change-Id: I6d84047b3481a2bf6bf9bd17d482fb504dbc752b
requirements.txt is unnecessary when run tox -e releasenotes,
releasenotes relative stuffs is in doc/requirements.txt
Change-Id: Ia6649ba95bdaa5d4c48f766bc8c1a87bab4f07b3
This patch adds a new tox environment and gate job that checks
requirements.txt for missing or extra requirements.
Change-Id: Id8c44821455644576cf055cccaa38c9ab2f49ec6
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Also added and enabled a hacking check that would have caught this.
Change-Id: Idb10f84fd32c50db24f844352cb85de452181439
Python versions supported by OpenStack change over time, and for minor
versions of Python 3 it is tedious to keep this file updated.
Since this does not impact zuul jobs in any way, nor prevent local
tests against py37, it should be safe to simply make this more easily
compatible for users that don't care about the specific Python versions
and just need basic tests to run.
The *only* thing this does is changes the default versions tested if none
are explicitly provided with `-e`.
Change-Id: I2372178351e961eeed5a819f39e75d54ba148798
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.
Fix problems found.
Update local hacking checks for new flake8.
Add test-requirements.txt to doc building, hacking is now imported and
needed for autodoc.
Change-Id: I06211ef20131c64deba135123e53d87f3b5356a2
Fix an issue that prevents graceful shutdown of controller workers.
cotyledon.Service.terminate function is by definition the graceful
termination function and doesn't have any 'graceful' optional boolean
argument (https://cotyledon.readthedocs.io/en/latest/api.html).
Because of this error, message_listener.wait() was never called in the
consumers' termination functions, so flows could be interrupted before
completion and could leave resources such as load balancer in a
PENDING_* provisioning state.
By default cotyledon.Service terminates the server after a timeout if
the worker could not shutdown itself gracefully. The default value
for the timeout is 300 seconds (set in devstack plugin) and can be
overriden using the graceful_shutdown_timeout setting in octavia.conf
The default value will be updated to a lower value when work on
persistant taskflow will be merged.
Story: 2006603
Task: 36770
Change-Id: I3f776bd018246897c9a889699a2d0ecbbfbb7098
It appears that these are required to have the upper constraints properly applied. We need to revert this change.
This reverts commit 7b8e6de1b8.
Change-Id: I4941df3894148482c597d30f3a8db70659fd1b7a
Since the base testenv tox target sets `usedevelop=True`, tox will
install the application (Octavia) into the virtualenv as well. Since
installing Octavia will install everything in requirements.txt, we don't
need to specify it again in tox.ini.
Change-Id: I31bdb2956ae37d1116069c2b37656ce2ee3c2dd5
Use the bandit testenv block in tox.ini instead of inlining
it. Also changed the call back to '-x tests' since that is
correct syntax, it was just broken in version 1.6.0, which
is now in the blacklist.
Change-Id: Id0bf1c6b1633ffb4143c7628b722434faf433d7d
Added the bashate script style checker to the pep8
check target in tox.ini. It actually found two valid
issues - a bad function declaration and a local variable
issue, but mostly just indentation noise. Fixed all the
complaints.
Change-Id: I43b60e7dcf53acf259c8a52b248fbb8c63d3c8d4
I had a few minor nits on the volume-based patch. This patch
corrects those.
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: I5f9ce36c878973f4ed96527af6f1024a362421d8
This patch adds support for the octavia-lib to get objects by ID.
Change-Id: I98b399891488e5972ea4d332c06b55b34f20fb11
Story: 2005870
Task: 33680
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
A recent automated patch[1] removed py36 from the tox default
environment list. Since Ubuntu 18.04 includes python 3.6 and we
still include a functional-3.6 test, we should keep the py36
environment in the list.
[1] https://review.opendev.org/#/c/669440/
Change-Id: I2bab434523efee0ad755e794f00c3a1ca85ec68f
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.
Note that redirects will be set up as well but let's point now to the
new location.
For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html
Change-Id: I9f617159eddc8af532403e47c325048d92cc9ade
The requirements team has defined a new strategy for handling
upper constraints[1]. This patch applies those strategies to
Octavia.
This also corrects a lower constraint for oslo.messaging.
[1] http://lists.openstack.org/pipermail/openstack-discuss/ \
2019-May/006478.html
Change-Id: I4cf0ad5d14c4378e33423a4d639ec4d0fcc2a614
Commit I3082962841d3b645f3cbd1a6b41fc7fb28dcf7e6 removed
octavia/tests/tempest directory
This patch removed other references to this path.
Change-Id: I665503aa4f69308ff31be53824b26faea13d2ad1
In order to support Python 3.7, pylint has to be updated to 2.0.0
minimum. Newer versions of Pylint enforce additional checkers which can
be addressed with some code refactoring rather than silently ignoring
them in pylintrc; except useless-object-inheritance which is required to
be silented so that we stay compatible with Python 2.x.
Story: 2004073
Task: 27434
Change-Id: I52301d763797d619f195bd8a1c32bc47f1e68420
Newer versions of bandit broke their handling of test exclusion
directories. It is now necessary to glob the contents of the directory
rather than just list the base path.
Change-Id: I02fbc02ce8d623b75a7d568ea48bb5e5e6c66b58
The TC has decided that python 3.5 tests are not required for Train
forward[1]. This patch removes the python 3.5 jobs from Octavia.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/ \
005097.html
Change-Id: Ic75cb45f7c89a80b779ade18a9e4a6f7bf1a6847
Newer Python versions don't like passing a mock in to an os.path.join:
TypeError: join() argument must be str or bytes, not 'MagicMock'
This patch also adds openstack-tox-functional-py36 to the gate queue.
Recent and major LTS distributions ship Python 3.6 or greater.
Change-Id: Ic71059da24e0d2c3f0ac3af5375906d8e8aa43f4
The commands used by constraints need at least tox 2.0. Update to
reflect reality, which should help with local running of constraints
targets.
Change-Id: Ic65e4f789e7394bf73920d17614c60e3e87e3750
Closes-Bug: #1801477
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: I7c45e4525f255deec7c79ae567cf4b1dda111a4a
It's time to raise the bar for Octavia coverage. We have been at >= 90%
coverage for a while now, so I'm comfortable proposing raising the
minimum to 90%.
Change-Id: Icd9024d076d3d1c13e35e7e293af3c4fc8406ddf