This patch updates our doc conf.py to support the linkcheck builder in
addition to adding a new 'linkcheck' target in tox to run the builder.
Also the release checklist is updated suggesting the linkcheck tox
target be run prior to a release.
Change-Id: Ia7c282b7331f0b624bb3324f27dfec223cf414f7
Closes-Bug: #1716005
the OS_TEST_TIMEOUT of 180 is too short for
some test servers. Allow it to be modified from the
outside via environment. Currently I have to sed the tox.ini
file to fix this.
Change-Id: Ib0e9aa0fff4cd26be115cc4b12036e9ee5e737f3
Since Pike log messages should not be translated.
This patch removes calls to i18n _LC, _LI, _LE, _LW from
logging logic throughout the code. Translators definition
from neutron._i18n is removed as well.
This patch also removes log translation verification from
ignore directive in tox.ini.
Change-Id: If9aa76fcf121c0e61a7c08088006c5873faee56e
This helps catch a number of potential issues with the neutron
code in advance. A false positive can be skipped with #nosec
at the offending line, just like #noqa can be added on
offending module imports.
Change-Id: I3e4cbc94539dd2cce61bfa5cd0265e75d7336311
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
It enforces loose checking so it sounds good to use it.
This flake8 plugin is already used in tempest.
Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.
Setup for unit tests of hacking rules is tweaked to disable
flake8-import-order checks. This extension assumes an actual file exists
and causes hacking rule unit tests.
Change-Id: Ib51bd97dc4394ef2b46d4dbb7fb36a9aa9f8fe3d
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
Change-Id: Ie38ec248651b57f2f2886cf90366cbf13673ffaf
After latest changes on tox.ini we need to change minimum
version of tox to 2.3.2. Problem is described in tox changelog
as #issue279. Without this change tests are unable to run.
Change-Id: I458cf0d5e8927cf11a44b49ecfb5178a228aafaf
Closes-Bug: #1695888
Fullstack tests are similar to non-test environments, so rootwrap and
rootwrap-daemon should be used instead of plain sudo.
L3 agents and DHCP agents used in fullstack tests should be guaranteed
to be eventlet monkey patched to avoid race conditions when two threads
are trying to issue commands via rootwrap daemon at the same time.
Closes-Bug: #1557168
Change-Id: Ida5a45420a8f58c1f5a36eb3fc546a7ea053a661
Signed-off-by: Hunt Xu <mhuntxu@gmail.com>
The rename is needed to match what
gate-neutron-dsvm-functional-python35-ubuntu-xenial-nv currently calls.
Change-Id: Ibda203a20a17d7e16217b19e5b83b38741ffb834
It turned out dhcp tests work only because agents are considered dead
after 10 seconds while they report to server every 60 seconds. This led
to calling network resync after agent revival and hiding the fact dhcp
agent is not capable of receiving any amqp messages.
This patch sets the report interval of agents to the half of
agent_down_time on server side and uses eventlet dhcp agent in order to
trigger eventlet monkey patching code.
Eventlet was behind the failure with messages not getting processed. As
[1] notes: "Note: If the “eventlet” executor is used, the threading and
time library need to be monkeypatched."
Because each port calls dhclient to obtain IP address and each dhclient
instance overwrites /etc/resolv.conf there was added a script that
generates fullstack-dhclient-script from an existing dhclient-script
before starting fulltstack tests. This generated script is passed to
each dhclient process running in fake fullstack machine using -sf
parameter.
[1] https://docs.openstack.org/developer/oslo.messaging/server.html
Related-bug: 1453350
Change-Id: I0336176b9c364fe3a95be5cef9e7a3af1ef9d7e9
Once a new neutron-lib release will be cut off, the new hacking check
will break the pep8 target because the code still uses translation
markers for log messages.
Instead of fixing all remaining log messages and hoping no new messages
land before neutron-lib release, we temporarily disable the check; we
will reenable it back once we have a neutron-lib release in gate that we
can validate the patch removing translation markers against.
Change-Id: Icef59a03184473476e0657334bcc30dc7bf4f9ff
This allows us to kill a bunch of in-tree checks. There are still some
checks that are either not yet in the library, or don't belong there in
the first place, so we still stick to our own factory, just reusing
whatever is there in neutron-lib.
This change skips some new checks. We gotta figure out what to do with
those, that will belong in a separate follow-up.
Change-Id: Ifeb40ec0e0c4ca623b33a6b9f500dec15cec4de0
Three ((value++)) lines are generating this bashate warning:
E043: Arithmetic compound has inconsistent return semantics
This will now be an error when running pep8 checks.
Trivialfix
Change-Id: If7a63e550d5d27fe6716cc63c85426cd2250732f
The current implementation of the coverage code job gate only fails
when the report is not created. This change pretends to set a
minimum reasonable percentage of code coverage(82%).
Change-Id: Ia30116fff8b834486bde93c329543fce15be429f
Bashate is a style checker program for bash scripts. This addition
improves the quality of the current bash scripts and ensures that
any future change will follow the same standards.
Change-Id: Ia346f77632d4ac7beb288fa3aacea221d7969c87
This may become handy when debugging gate failures like job or test case
or ovsdb timeouts, to see the load of the machine, as well as to
understand whether the machine was e.g. locked by its hypervisor during
test run.
Instead of using devstack as a library, we just enable the service in
local.conf [[localrc]], and then call ./stack.sh.
Now that we install some pypi packages into the system, and since
functional targets were using those system packages, post_gate_hook.sh
broke failing to locate subunit-2to1 script in the tox env directory. To
fix that, we disable sitepackages= for all functional tox targets. This
was enabled back in the times when we attempted to install neutron for
the functional job using devstack [1], and we no longer do it, so it
should be ok to stick to all packages from the tox venv.
[1] Icc38cacd69bc5843ccfcc60237a7102df6d8597f
Change-Id: I73857f63f512e26d595c61a20ec5bf22d2fb0da7
The gating on python 3.4 is restricted to <= Mitaka. There is no
need to continue to keep these settings.
From Newton onwards we are gating on python 3.5.
Change-Id: Ib6e6c62212796f493bb99fb3c5e39ab4f2e45cfc
The release includes its own check for delayed string interpolation for
log messages, so we can now remove our own check for the same thing. The
check is off-by-default, so we need to explicitly enable it. Sadly,
select= directive in tox.ini is broken [1] so we need to enable the
check with flake8 argument instead.
[1] https://github.com/PyCQA/pycodestyle/issues/390
Change-Id: Idc6b8e5b1cb594e130d4cc0cbcfffd362f9ab86a
This allows to avoid installing unneeded packages when in gate, saving
some time when preparing environment for unit and other non-dsvm tests.
Change-Id: I09aa9c7ebebf12d0c0cce7457fef57f8451fcffa
This tools list the constants and exceptions that have moved
to neutron-lib. Add it to pep8 to raise awareness of moved
globals.
Related Blueprint: neutron-lib
Change-Id: Ic6439f98d4bf8f566debf26eca3337f359119d5a
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.
To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.
Change-Id: I93d9447b5f26ba474d4c283a3df49cf4461c715d
NOTE: All subprojects should do this too.
The tox.ini has some unicode characters that cannot be
decoded, so just executing tox will immediately cause an error
because the tox.ini cannot be parsed.
Closes-Bug: #1600068
Change-Id: Ia01ae80d9321584845bb06c3f6673d13027bd2db
There is a bug in pep8, when 'select' used, it omits all default checks
and runs only those specified by 'select'. We got hit by this issue
since I2d26534230ffe5d01aa0aab6ec902f81cfba774d was merged which lead to
almost no static checks in pep8 job.
Also note that off_by_default decorator has no effect for now because
factory in hacking is triggered after ignored checks are collected.
There will be a follow-up patch for that in order to make pep8 doing
its job quickly.
[1] https://github.com/PyCQA/pycodestyle/issues/390
Related-Bug: 1594756
Change-Id: I8e27f40908e1bb4307cc7c893169a9d99f3433c4
Commit 56efc8ac76415070041d125a6e30523caf9b3cbd and
commit 7ddfffb0fc37f4fd04937b11ac03b95aeed1306c removed olso incubator.
So we can remove this from the files that are skipped as they no
longer exist.
TrivialFix
Change-Id: If88988edac2ae2829a8f5827f855812db56ba63e
unittest2 contains bug fixes to unittest for all versions of Python<3.5.
Move unittest references to unittest2.
Bumped hacking requirement to reflect the version in
openstack/requirements that is the minimal version that supports
off_by_default checks.
Change-Id: I2d26534230ffe5d01aa0aab6ec902f81cfba774d
Depends-On: I883223962426ed8e9cdf4e304dfed17ef0946c8a
Log files as .txt files, don't zip them, and put them where
they need to be instead of copy them there in the post gate
hook. The benefit to doing this is that we'll get logs
for tests even if the job timed out.
Change-Id: I4bfd27534c827aed3cbd7b43d7d1289480ea4806
Related-Bug: #1567668
Now that we stopped copying tempest code into our tree, it's fair to
enable the pep8 checks for the subtree.
Change-Id: Ie23b4db2d4d0e3e75e8fdf4af3bf0a430069928e
Since adoption of the Tempest plugin framework, this
extra plumbing is no longer necessary in tree.
Related-bug: 1555356
Depends-on: If5f7ea82c45494953452f728fabb7403d0b6e14e
Change-Id: I5377f33c5a7b29f97f00878e048d154378a4fe34
Make use of the Tempest plugin interface instead of copying Neutron
files into Tempest. This will remove the burden to port Neutron
tests onto Tempest master recurrently.
It uses neutron/tests/tempest/ as new top folder for all Tempest
tests. It follows the model of Heat [1].
[1]: https://github.com/openstack/heat/tree/master/heat_integrationtests
Partially implements bp external-plugin-interface
Change-Id: Ia233aa162746845f6ae08a8157dcd242dcd58eab
Move the requirement to test-requirements so that we can pick up
bot proposals. Let's also match the global-requirement pin.
https://pypi.python.org/pypi/Tempest/11.0.0
Depends-on: Id2c7e09611c1f8b06e6d272589b4ea3435b8de86
Change-Id: I91d6432eabe3de1620fa1ab07ea715e29de62296
Now that we don't need the script to pull tempest from git, it became
redundant. It's better to clean it up.
Change-Id: I8881840813339c20e4d5c59b98c2eff63f4feffb
Since [1], Tempest is a pip installable package, and that prevents zuul_cloner
to work correctly. This change moves away from the existing logic in tox_install,
and adds tempest as an explicit requirement for the api job. This is in fact
the only tox target that needs Tempest to work.
tox_install.sh has become less important now, but cleanup is left as follow
up, to speed up gate salvation.
[1] I25eac915c977ebaedced66ac896c5dd77259d193
Depends-on: I1d1ca087982d7bdda983686775736ed258026aeb
Change-Id: I00d882dde77a687ecb57ec200a34fd96256ad87a
* Detect neutron.i18n import (neutron._i18n is recommended)
* Check builtins _ usage
* 'builtins = _' in tox.ini is no longer required.
* Introduce hacking rule doctest framework.
Newly added check_builtins_gettext() hacking check takes
token as argument. It is not a good idea to pass a tokenized
line manually. Instead it is reasonable to use docstring based
tests used in hacking repo.
Change-Id: Ib7464658fc4c8a6f1b03af6ab46f0bd3ee0bfb18
Database teardowns seem to have a lock contention issue. This is a
workaround.
Change-Id: Ifd0957a86646c6a13a71b5bbf985f4694e37e943
Partial-bug: 1541742
Now that gate does not rely on -constraints targets [1], we should be
safe to remove them.
[1] Iea3a0b1f740d5679ebfa135f2bf5b89c52008716
Change-Id: I59855f1b15d54323dcc7c4759904be7124a1df1a
Since neutron gate already switched to -constraints target, we need to
keep those targets until we switch gate back to using targets without
the postfix.
This change effectively makes both types of targets identical.
Note: override install_command for venv, releasenotes, and cover targets
since corresponding gate jobs do not provide constraints file yet.
Also removed cover-constraints target since it would never work in gate
anyway.
Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com>
Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: Ica2d509df0c54496aba7cb3162565384cc5d34c8