tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~
According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293
Change-Id: I16073e791defeb3bd454b1c9a4f533e66fe1a260
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Add release notes and update the python
classifier for the same.
[1] https://governance.openstack.org/tc/reference/runtimes/zed.html
Change-Id: I68fded0366a3be3ef5459391982e80c570562735
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.
Change-Id: I04ac905b0b01c5a717fc4b168982c8e1e0833264
The latest pip resolver started to check requirements strictly
and it detects many inconsistencies in neutron-vpnaas requirements.
Also applies the practices discussed in the mailing list [1][2].
* Drop pyflakes from requirements.txt as it is not used.
* Move document dependencies to doc/requirements.txt [1]
and drop them from lower-constriants.txt.
* Bump MarkupSafe lower-constraint to 1.1.1
to make it work with newer setuptools.
* Bump the minimum neutron requirement to 17.0.0 (victoria release)
as the previous min version 13.0.0.0b2 is too old.
Wallaby and Victoria neutron are not different much, so I think
it is no problem to use the latest released version here.
* Dependenicy related to neutron min version bump are updated
in requirements and lower-constraints.
Note that eventlet 0.22.0 is used as lower-constraints as 0.21.0
(the min requirement in neutron 17.0.0) is blocked in several libs.
* Move linter dependencies to tox.ini and drop them from
lower-constraints.txt (pylint, pyflakes, astroid, isort)
* Drop psutil from neutron_vpnaas/tests/functional/requirements.txt
as the specified version of psutil is too old and psutil is a dependency
of neutron so we don't need to install it explicitly here.
In addition, hacking version is updated as hacking 0.12.0 is not compatible
with python 3.8. W504 and I202 are ignored as we do in the neutron repo.
Other new flake8 violations are fixed.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019362.html
Change-Id: I47f6d39379b68c4d71fc4d85ebb06d97cb5a6ce2
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.
This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.
Change-Id: Ic9f2f0b044a8ab6e6974447dc2d710b3b328bf84
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
It migrates neutron-vpnaas-dsvm-functional-sswan job to the native
Zuulv3 syntax and renames it to be "neutron-vpnaas-functional-sswan".
Change-Id: Ibe6ac8677ace52e08edb7e47f3365616a3e6b29a
This commit defines the default policies in code. VPNaaS has
no policy.json so far, so all policy definitions are newly created.
Partially Implements: blueprint neutron-policy-in-code
Change-Id: Ic0bf99b69a792197399e38ace6d23ea18874892a
After latest changes on tox.ini, the minimum
version of tox need to be changed to 2.3.2.
https://bugs.launchpad.net/neutron/+bug/1695888
I458cf0d5e8927cf11a44b49ecfb5178a228aafaf
Change-Id: I62991679465a52710b8c24af80fdb311c1e26969
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: Iccd8b6a73946d841a383ac9558fec3ae031373cd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This patch adds the pep8-dev tox target for running pep8 locally as per
[1]. In addition it updates the pylint version to work with python 3.x
and addresses some pylint errors in the code.
[1] https://etherpad.openstack.org/p/neutron-sibling-setup
Change-Id: I7bd4d8e75601a7291692d6256925f46fb4fa5464
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Fix tox.ini html files in right place.
Change-Id: I8493a3ef704b1da458153a8da3f9b26145f5bff2
Story: #2002586
Task: #24314
This patch adds a py3-dev tox target for running py3 UTs locally.
It also updates the local .zuul.yaml for a neutron-vpnaas specific
lower constraints job that ensure neutron/master is installed.
Change-Id: Iab9f134b17b56d765d5ac523d9b5a4b4d4e00fb7
Partial-Bug: #1779335
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
Change-Id: Ia4c71631e4c51ec814bcefc115d4f5690c11e37b
neutron-vpnaas documentation needed to be updated to the document
structure recommended by the docs team.
This commits add several sections and reorganizes the existing docs.
Change-Id: Iae2704f3d0653e00c18cf1fccdbcb8b926a5b15c
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: I312f591a68fa30636502eadb563de5656faca3e9
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Instead of using tox-install.sh, we can install horizon and neutron
now directly from pypi - or use the current branch in CI system using
tox-siblings.
Update tox.ini for this change and add neutron to requirements file.
Change-Id: I435297ada6cdeb53a9bd8da8b88714f2c6a838a2
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
[H904] Delay string interpolations at logging calls
Change-Id: I7450cd259fffa2a97fcb28cc61727532478eeccb
1. 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.
2. This patch is also intend to clean up exceptions to avoid
confusing for other developers and the maintenance-ability as well.
Change-Id: I032892f08e073feb5b822d27d092f041b17d57e1
This makes tox use the latest version of the tool from os-testr repo,
which contains some valuable changes, like the one making the gate fail
if for some reason no tests are executed because all of them are
skipped.
Change-Id: If88be4b310d746ccc885e3d0c1db8a4dfabb2a28
Infra has been running python35 jobs, replaced the python34 jobs.
This is due to the change from Ubuntu Trusty to Xenial, where only
python3.5 is available.
So we update a py35 environment with the same definitions for
skipping not-yet-working checks as we have in place for py34 already.
Change-Id: I3e7fc720ca6bd9df80620d609e9a9603a644673a
Do not install in /tmp/openstack/neutron and leave the git repository
there after the script is run - if zuul-cloner is used.
We run jobs on long lived workers and also on developers machines, let's
cleanup afterwards.
Install into a temporary directory that can be removed with "git clean"
afterwards. Add this directory to ignore list of pep8.
Simplify with using pushd/popd.
Also, remove setup of ZUUL_BRANCH, this is not needed with current zuul
anymore.
Sync file with neutron-lbaas.
Change-Id: Id56b9b70fb9c4113f4641e5b3f35ab63cfff6d4e
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: I1a8c6e305ccb9244eb7c690a93921d0982b3ecbe
Currently, when we run api tests with command: "tox -e api",
tests are failing with errors.
This change first fixes errors, make api tests pass. Then refactor
the neutron-vpnaas api tests tree to fit the tempest plugin.
As a tempest plugin, the steps to run tests by hands are:
1. Setup a local working environment for running tempest
tempest init ${your_tempest_dir}
2. Enter ${your_tempest_dir}
cd ${your_tempest_dir}
3. Check neutron_vpnaas_tests exist in tempest plugins:
tempest list-plugins
+----------------------+------------------------------------------------------+
| Name | EntryPoint |
+----------------------+------------------------------------------------------+
| neutron_tests | neutron.tests.tempest.plugin:NeutronTempestPlugin |
| neutron_vpnaas_tests | neutron_vpnaas.tests.tempest.plugin:VPNTempestPlugin |
+----------------------+------------------------------------------------------+
4. Run neutron_vpnaas tests:
tempest run --regex "^neutron_vpnaas.tests.tempest.api\."
In the jenkins gate, devstack-gate/devstack-vm-gate-wrap.sh will invoke tempest
with proper configurations, such as:
DEVSTACK_GATE_TEMPEST=1
DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
DEVSTACK_GATE_TEMPEST_REGEX="^neutron_vpnaas.tests.tempest.api\."
The actual raw command in gate running under the tempest code directory is:
tox -eall-plugin -- "^neutron_vpnaas.tests.tempest.api\."
This is a part of activate the API job:
https://review.openstack.org/#/c/337011/
Change-Id: Icdc946bccb77b4c78d161a590de1aa15e0a57139
Post jobs are currently failing since constraints are not available but
required by this tox.ini file. Change venv environment to work without
constraints.
Change-Id: I736be6a49f919302c31fc7ebd8251cb0a0d73853
To solve the problem of "db type could not be determined" on py34 we
have to run first the py34 env, then, run py27. This patch puts py34
first on the tox.ini list of envs to avoid this problem to happen.
Change-Id: I9457f7e05adb77d4b034ef01e7e51d95fc066013
Closes-bug: #1489059
Missed changing the envlist to not specify constraints based target
names for master (where constraints are used by default). This
simple commit cleans that up.
Change-Id: I9d11cfd47adae3f49d33e5db8c916ebd983a8f96
Related-Bug: #1522503
The neutron-vpnaas repo already has converted to using constraints for
targets. However, the TC recommendation is to use constraints on the
original job names (pep8, py27,...), instead of using the constrained
names (e.g. pep8-constraints).
A separate commit (I34f0b355703fe0133f160afd4e32f2272d41ecaa) restored
the use of the non-constraint NAMED jobs for Liberty and newer.
This commit modifies those non-constraints targets so that they use
constraints. A manual check was made that each target used the same
package versions for both constraints and non-constraints targets.
Then, after both constraints and non-constraints jobs passed in Jenkins
(before and after the project-config commit was upstreamed), the constraints
based targets were removed from tox.ini.
Note: Found out that infra doesn't support constraints based cover and
releasenotes. Added TODO to these targets so that they can be updated,
if and when constraints are supported.
Note: In the gate hook, config_for_vpn_func_testing.sh calls Neutron's
config_for_func_testing.sh, which will setup files in the venv. To prevent
that script from modifying the VENV variable to have -constraints suffix
and store files in the wrong venv, we turn off USE_CONSTRAINT_ENV, prior
to calling the Neutron script.
Once this is upstreamed, we can backport this fix to Liberty to complete
the effort for this repo.
Change-Id: I4a2410ab80e6018f1b65b2288ae66312eb49cb27
Depends-On: I34f0b355703fe0133f160afd4e32f2272d41ecaa
Partial-Bug: #1522503
Was seeing py34 (and DSVM) tests failing with an Invocation error, even
though the test passed. Switched to ostestr, as is done in Neutron under
commit 240facf9e67aa5b205679f397107abfe059a869a, and the test passes
(not sure what the root cause is here).
Change-Id: If85987865e0393892c52f319d7cef526c021e0df