H203 and N536 are equivalent. Use the built-in one from hacking.
Change-Id: I04a9ce41539ead71f8df0510c07ab2505ab7db3f
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This patch also removes the workaround needed for ovsdbapp 2.14.0
release in the functional test job.
Related-Bug: #2131994
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: Id895c01dd9342a28df99055b0dc2fde9b5e70b1d
This patch is overriding the OVN_SRCDIR, OVS_SRCDIR and VTEP_SRCDIR
directories until the proper fix lands in ``ovsdbapp``. This patch
will unblock the zuul gate temporarily.
Related-Bug: #2131994
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: I0fc4b92a8dbaf5631470a9d74860fe76d8dd6109
In [1], the "passenv" variables from the "testenv" section were
missing in "dsvm-functional".
[1]https://review.opendev.org/c/openstack/neutron/+/952258
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: I0cc812e0976829ea7b497782b5aec5706d5a5692
N530 was in both enable and ignore, removed from enable as
it should be ignored.
Fixed H701, H702 and H703 warnings and removed them from
ignore list so they are enforced.
TrivialFix
Change-Id: I07792b6907f551f428d9c8d3986017a4e9d2441f
Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
Neutron no longer supports using ``EVENTLET`` backend. This option is
removed from the tox.ini file.
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: I924adfe34d952b6fb166e677f5211a3d0b747392
This patch restores the N535 pylint check that prevents the Neutron
repository from using the eventlet library.
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: I8502122e0adc2376a451dd5963996301d99d5ba3
More information about this patch in the document section "Eventlet
Deprecation Reference".
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: I5d8b828e100cfcb374ddf311da4cd7805dd26ffd
This patch requires a new neutron-lib release (3.21.1) containing
the depends on one.
Change-Id: I880dc9e7f0d3cd578168e5c1435275901fc68f1f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/956353
This commit [1] removed ability to run pylint only on files
that were modified by latest patches. This patch adds it back.
[1] be77ed3a81
Change-Id: Ic6cbe9c9639b976a46fb2858c10c9caf0c998bbf
Signed-off-by: Jakub Libosvar <jlibosva@redhat.com>
The ``TestOvnNbSync`` class tests are executed with concurrency 1. The
same must apply to all tests from child classes
(``TestOvnNbSyncOverTcp``, ``TestOvnNbSyncOverSsl``). This configuration
should apply to ``TestOvnSbSync`` and its derived classes
(``TestOvnSbSyncOverTcp``, ``TestOvnSbSyncOverSsl``).
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: Ie64827a3d5212d22eff5ce48cbbb10b28de65a41
These are needed as we need to override PYTHON3_VERSION
in FIPS job running with CentOS 9-stream.
This reverts commit b615560926.
Signed-off-by: Yatin Karel <ykarel@redhat.com>
Change-Id: Id49739b36f16a05a0ce8d702ed390c56ce392c46
We still have eventlet usage so until those get's cleared[1]
we need to ignore the hacking check.
[1] https://review.opendev.org/c/openstack/neutron/+/952258
Change-Id: I39e37445864de75df40d08a09c1ff2db5b580769
Signed-off-by: Yatin Karel <ykarel@redhat.com>
These are not enabled by default when you enable the group with 'select'
Change-Id: Iee191fc778c014acd2d093e1f2107e11cd1e81fd
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Got dropped in https://review.opendev.org/950581
Also add ignore_basepython_conflict = True to avoid:-
tox.tox_env.errors.Fail: env name py312 conflicting with
base python python3
Change-Id: I0b2e88c8cf7a532280ceaf0bdaeb240297f1270f
Signed-off-by: yatinkarel <ykarel@redhat.com>
This allows us to replace bandit and flake8. It also ensures we run
pyupgrade-like checks continuously to prevent adding Python < 3.10 style
syntax in the future.
Long-term, we should look at replacing autopep8 with ruff, but that's a
different discussion :)
Change-Id: I12f058d95a0745d895b3257dbaa4e866835c7008
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
As described in the TODO comment, this method is not at all used.
Also loose the minimum boundary of coverage percentage, because
the limit matches the exact percentage of current tests and can be
easily broken.
Change-Id: Idd9f4ade3911b21691f220c5eafa09463689b8b3
These tests randomly failing for different reasons
as described in the bug, moving these to run with
concurrency 1 will help.
Partial-Bug: #2115026
Change-Id: I21f0993356fe4d1ad518bd5b991541cc9c3fb425
Bandit 1.8.4 is more strict for random functions, see: [1],
to avoid pep8 failures due to the few random calls in Neutron,
skip B311
[1]: https://github.com/PyCQA/bandit/releases/tag/1.8.4
Change-Id: I1a2119221be57afaa94a94ecb1448196802f041b
As discussed at the Flamingo PTG meeting, run an automated
upgrade tool to make code python 3.10+ compliant.
Result of running:
$ pyupgrade --py310-plus $(git ls-files | grep ".py$")
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place neutron
Also did manual updates as necessary to fix other errors
and warnings after above commands.
Bumped versions of checkers - pylint, bandit and mypy to
more recent versions, which required disabling a new
warning, too-many-positional-arguments.
Change-Id: Ic6908af2c331e3ea6c50f1a8a8e261db41572645
This patch moves the following test classes to the 1 worker execution:
* TestNBDbMonitor
* TestNBDbMonitorOverTcp
* TestNBDbMonitorOverSsl
Related-Bug: #2088423
Change-Id: I138eb78683aa1cbc565533e2ef011f1946f9bc58
Until we handle the keepalived-state-change script properly
let's workaround the issue with some CI node to run the
problematic test in the end.
Related-Bug: #2091855
Change-Id: I51c8df10d4efe2da0a66a18c0262cb1dbfb1eb9e
With some CI nodes which runs with 4 CPU we seeing
random failures in functional jobs as some processes
getting oom-killed.
With this patch splitting tests in more runs so
memory not remain utilized till completion of all the tests.
Related-Bug: #2091855
Change-Id: I01bd8eb72aa5545b072bccec4a75f6062529b1c5
Usage of assertTrue(isinstance(a, b)) is already checked by
the built-in H211 check which is enabled by default.
Change-Id: Ib72a4055212d125718bb5a096fb602ddb2878406
This is useful when we'd like to run a `dsvm-` target but e.g. not fail
on particular dependencies missing, e.g. db backend.
Change-Id: I978435f8ccad5bfff87f47a2e2f65a9b6867b246
This dependency was moved from test-requirements.txt to tox.ini[deps] a
long time ago: I0111c41bea6a6caf5ffba1f5c34489854d9c9747 due to some pip
resolver issues related to lower-constraints.txt
Since then, a lot has changed and this probably doesn't apply anymore
(other projects like nova already keep the dependency in
test-requirements.txt).
We actually import hacking from neutron.tests.unit (because we have
custom rules), so it makes more sense to keep the dependency with the
rest of requirements.
Change-Id: I02ad072fb2982f6968db987cb822efdc1b6f10ba
The patch also bumps mypy to the latest release on pypi. It fixes one
discrepancy in error reporting between different basepython versions.
Change-Id: I359e82463911821568be7939f9c08209401d0d08
Ia70f471c0f66679c44c4d3684c9e46c00993f3b3 incorrectly removed mypy
dependency from the target, which broke `tox -e mypy`. This change
makes sure the target uses all dependencies from pep8 target (which also
now includes the mypy dependency).
Change-Id: I3ccef4183fd3020e51af195fab5d3949b7611151