Commit Graph

48 Commits

Author SHA1 Message Date
Roman Dobosz e849734c4e Fix tox4 error.
tox.ini started failing with Tox 4.x which introduce different
interpretation for 'skipsdist' option. If set to true, application will
not be installed in the tox virtualenv, while on previous version (3.x)
it will be installed, if usedevelop is set to true.

Change-Id: I7716c14a3f18d78a3da15c8e27e60b740c659ef6
2023-01-17 12:57:14 +01:00
Ghanshyam Mann 6ac2b4a813 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: I91c271d46a2b596c1c007b741363ba51f0b1690a
2022-04-30 20:20:07 -05:00
wu.shiming 378ce7cc04 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: Ib37ac703ae9a49c31f0797f210174c591a4b8109
2021-05-31 09:54:53 +08:00
Zuul 92b8025558 Merge "Update TOX_CONSTRAINTS_FILE" 2020-11-18 10:33:24 +00:00
wu.shiming 8a53492a81 Update TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
-https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://review.opendev.org/#/c/722814/

Change-Id: I9eeb629a7eae9b3b726ee7025e24ee49fc0ede87
2020-11-17 14:02:26 +08:00
zhoulinhui cdcaaa6e2f Reuse the docs deps to benefit from constraints
Tox trying to install latest versions for building releasenotes,
which may not be supported by stable and lower branches,
so should be restricted by respective version's upper-constraints.txt
This ps to reuse upper-constraints.txt from docs deps

Change-Id: I70d53f31dccca644bcea1abf0b1976bc7121ffe9
2020-10-06 21:27:56 +08:00
zhoulinhui 68dd879de7 Bump py37 to py38 in tox.ini
In wallaby cycle, we should test py38 by default.

Change-Id: I50fd553a8b19e374272d85f60b3f4b90a396a3e0
2020-09-29 22:12:25 +08:00
Roman Dobosz b53bcf946f Fix coverage environment in tox.
Currently, running tox -e coverage will result with error. Shamelessly
stolen commands from Nova project to fix that.

Change-Id: If09c65e895a31daac56afff846861815390a520c
2020-07-27 09:47:23 +02:00
Michał Dulko 28b27c5de2 Remove Python 2 support
Ussuri release is the one in which we drop Python 2 support, as its EOL
is pretty close now. This commit does so in kuryr-kubernetes by
removing Python 2 unit test jobs, switching all tempest jobs to Python
3, removing specific jobs for Python 3 and updating Dockerfiles to
centos:8 that includes Python 3 from the box.

Also CentOS 7 job is removed from check queue as it seems it doesn't
play well with Python 3. A CentOS 8 job will get created soon.

Change-Id: Id9983d2fd83cef89e3198b2760816cf4a851008b
2019-11-19 12:34:54 +01:00
Michał Dulko b95a0c33c9 Use upper-constraints in docs builds
We've just got hit by cffi pypi package upgrade. This is because we're
not using upper-constraints in our `docs` tox environment. This commit
fixes that by adding it to the env.

Change-Id: Ia4719e7f98b2f6632f321b215f4a31015cc1ca69
2019-10-15 15:29:07 +02:00
pengyuesheng 663300ba91 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I16c4cc72870e1a2d495a2385b0cd21f8969ad474
2019-09-23 15:59:22 +08:00
Corey Bryant 0b7f8fafb5 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: I8064c9a1bc66a79b9a8f3fa02abc87f92965ca16
Story: #2005924
Task: #34217
2019-07-05 11:40:28 -04:00
Michał Dulko 6b58a1b58e Replace git.openstack.org with opendev.org in URLs
Change-Id: I1909cf75595fd9da7dfb1481478756711e9bb06c
2019-06-26 17:57:01 +02:00
Zuul afc8f971eb Merge "Add py36 to default tox environments" 2019-05-29 09:02:02 +00:00
Michał Dulko 533ab7cff5 Fix incombatilibity with openstacksdk <= 0.17.2
We keep 0.13.0 as minimum supported version of openstacksdk in
lower-constraints.txt, but we've found an issue running with 0.17.2. The
issue is fixed by switching from dict notation to object notation when
accessing properties of calls to openstacksdk as only newer versions of
openstacksdk support dict notation.

Another side of the story is that our lower-constraints job doesn't
really install versions from lower-constraints.txt due to a mistake in
tox.ini. Maybe we could have avoided the aformentioned bug if we had
noticed that before. This is fixed by this commit and that also required
me to bump up the pyroute2 to 0.5.3 in upper-constraints.txt as
apparently 0.5.1 isn't py3-compatible. protobuf is bumped to 3.6.0 as
3.5.2 version apparently wasn't compatible with our own code.

The unit tests are now updated to make sure using dict notation to
access openstacksdk objects will fail on lower-constraints job in the
future.

Change-Id: I5113f7574f4d2e450de95494c9287bb7427e67d4
Closes-Bug: 1830398
2019-05-28 09:08:11 +02:00
Michał Dulko 4f75760aa4 Add py36 to default tox environments
Seems like I46b077f268d3a812e36f3de532ce1bfe7636166c removed py35 from
the default tox environments. This commit adds py36 there instead to
make sure Python 3 is covered.

Also debug-py35 env is updated to debug-py36 to remove py35 completely,
which is what aforementioned commit was intending to do.

Change-Id: I5a6fdaa0b5d94b9d2827a1a3889a00fce121cf6d
2019-05-24 17:39:10 +02:00
Ilya Maximets 685f4c456a Add PodResources service client
PodResources client could be used by sriov cni to obtain devices
allocated for container by sriov device-plugin.

KubeletPodResources service is still in alpha, so it should be
explicitly enabled in kubelet feature-gates:
    kubelet --feature-gates KubeletPodResources=true

New config option 'kubelet_root_dir' added to 'sriov' section
that defaults to kubelet default root-dir '/var/lib/kulelet'.
In case kubelet started with non-default root directory passed
via '--root-dir' option, the same value should be configured
in 'kubelet_root_dir'.
Note that if sriov binding driver will be used inside container
'kubelet_root_dir'/pod-resources directory should be mounted
to this container in order to allow communication with kubelet
via gRPC protocol over the unix domain socket.

Partial-Bug: 1826865
Depends-On: https://review.openstack.org/#/c/652629
Change-Id: Icf088b839db079efe9c7647c31be4ead867ed32b
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
2019-05-20 14:16:04 +03:00
Ghanshyam Mann d193767135 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: I46b077f268d3a812e36f3de532ce1bfe7636166c
2019-04-14 22:58:11 +00:00
Michał Dulko 591d8bc031 Enable tox to run inside containers
Seems like this change is necessary to be able to execute `tox` inside a
container, so why not?

Change-Id: If65913a8b564d21146dc7324e0aabade46065c6c
2019-04-05 11:54:13 +02:00
Zuul c46441edf8 Merge "fix tox -e debug target" 2018-10-15 08:54:24 +00:00
Alexey Perevalov 51dfd98ee5 fix tox -e debug target
W/o explicitly set -t parameter for oslo_debug_helper, debug/debug-py27/debug-py35
target failes with following error:
    ImportError: Start directory is not importable:'./kuryr-kubernetes/tests'

Debug target can be usefull in case when somebody wants to use interactive debugger
e.g. by placing following:
import pdb; pdb.set_trace()
into for example TestNestedMacvlanDriver.test_connect
and run
tox -e debug kuryr_kubernetes.tests.unit.cni.test_binding.TestNestedMacvlanDriver.test_connect

Closes-Bug: 1797523
Change-Id: I9d35815be7836a06dda4de1abfa6a8cd5b022457
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
2018-10-12 11:28:55 +03:00
Nguyen Van Trung dcd37739dc 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: Ia3b5e60cc66a9f274f03327ce031c65a12bf1529
2018-10-09 10:12:27 +07:00
Zuul 84acb2c343 Merge "Switch to using stestr" 2018-07-17 10:48:45 +00:00
Chuck Short 055f31365e 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

Change-Id: Idf2f91565f9205c745a7110be5bf81267bd3caf5
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-07-16 15:43:10 +00:00
huang.zhiping 7ed98230cb 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: I634e5ed6236ff0253b713b411ab203072485af2c
2018-06-09 09:53:17 +08:00
Nguyen Hai 085ad0a6cf Follow the new PTI for document build
REF:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

This also re-organizes index.rst

Change-Id: Ic2509e76d03c159cf40e84f6b5912fdabe826c8d
2018-06-04 02:13:43 +00:00
Doug Hellmann 183aeebf5c 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: Ic0e992533d1b5840e665aa1a5a311c3e1b0d74e8
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-23 17:30:00 +01:00
Irena Berezovsky 9fb03707f5 Add Reno release notes support to Kuryr-Kubernetes
Add support for publishing release notes using Reno [1].

[1] http://docs.openstack.org/developer/reno/

closes-Bug: #1733344
Change-Id: I3fbb1cf2f7238c7edaa3137255e5af5ca29f1d89
2017-11-23 15:26:59 +02:00
liangcui 9046fc8b8b Enable some off-by-default checks
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: Iac4e864493d29e896d2a7657eb30fb6c10c9d451
2017-06-22 17:04:44 +08:00
Kirill Zaitsev fcb5cf9840 Enforce E128 pep8 check
This commit removes the last pep8 check that was excluded
(E128 continuation line under-indented for visual indent),
and cleans up code to match pep8.

Change-Id: Ia1a6d672df521c35bbd1579971d27d546f4f5481
2017-06-13 14:22:51 +03:00
Kirill Zaitsev 6d9e564251 Cleanup and enforce pep8 checks
tox.ini contains a bunch of excludes, that are unnecessary. Some are
leftovers from neutron. Some are already fixed and there is no point in
excluding them and some are easy to fix.
This commit does not fix E128 as it is the only serious exclusion with
(currently 166 lines to be changed)

Change-Id: I48cb6cd2258b2d8ed5b8dfdd3ceac7d8d573be81
2017-06-08 15:36:44 +03:00
Danil Golov c137e2eead Remove .testrepository/times.dbm before test runs
"tox -e cover" may fail if run after "tox -e py27". This commit
tells tox to remove times.dbm between test runs.

Closes-bug: #1690751

Change-Id: Iea10b2bb5a72e8cf36afa5216b17aca3bc155ddc
2017-05-19 07:53:41 +00:00
Jenkins 07c8879542 Merge "Remove subunit-trace fork" 2017-04-20 05:22:37 +00:00
Ihar Hrachyshka 5d232b3b74 Remove subunit-trace fork
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
2017-04-06 11:46:04 -07:00
shihanzhang 1d35146a46 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: If4735fc3ac1803585efd90657539e540d157a59a
2017-03-28 15:13:49 +08:00
Jenkins 9ca6a815e5 Merge "Add Constraints support" 2017-03-27 14:51:36 +00:00
Antoni Segura Puimedon dabfdf1594
testing: drop zero hashseed
Tox >= 1.6.2 already sets a random hash seed for the tests[0], no need
to use the python2 behavior of seeding to 0. This is good as it will
make sure our tests continue to be better written.

[0] https://tox.readthedocs.io/en/latest/example/basic.html#special-handling-of-pythonhashseed

Change-Id: I9c0be68b387838b0c64c86528f06f3cccc9d1195
2017-01-31 23:50:28 +01:00
Janonymous 0271cdb98d Bump tox min version to 2.3.1
We will use passenv in the file once fullstack cases
are up. For that we can bump tox min version to 2.3.1
like other projects.

Change-Id: I42a824c1878dda82ea8197469d061c491b4080db
2017-01-25 04:20:59 +00:00
Jenkins a3992814b5 Merge "Updated python debug target from 3.4 to 3.5" 2017-01-10 09:39:12 +00:00
Tin Lam 8cba334018 Updated python debug target from 3.4 to 3.5
Changing the python debug target in tox.in to use py35 from py34.

Change-Id: Id47dfb229b2397292158a746c6acab1e881b35ec
2017-01-08 00:43:10 -06:00
xhzhf 57fc62659c H402 hacking have been deprecated
H402 hacking have been removed since hacking 0.10.
https://github.com/openstack-dev/hacking/blob/master/setup.cfg
test-requirements of kuryr-kubernetes require hacking <0.12,>=0.10.2.
So remove H402 ignore statement
Closes-Bug: #1654117

Change-Id: I9c0ccc99c3f1b9a9f0514f21c3ee02875e306bb4
2017-01-04 18:07:24 +08:00
Tony Breeds 44ecee67b4 Add Constraints support
To be co-installable with other OpenStack projects and have consistent
testing it's a good idea (tm) to use constraints when creating tox
environments.

Change-Id: I69045d7f3d4e70c273163916f79be382b97c724a
2016-12-21 11:47:21 +11:00
Ilya Chukhnakov f383c67b41 tox: fix coverage
'tox -e cover' was broken as 'coverage' was looking for
'kuryr-kubernetes' package instead of 'kuryr_kubernetes'.

Change-Id: I3c52e5ce8b5e2fdad385a2edf16f9dc35f9286cd
2016-11-18 10:14:56 +03:00
vikaschoudhary16 bf339a5852
Fix sample config file generation
Fix config file path in tox.ini

Change-Id: If4d3f354bfbc2cda05b6e16c8bd9851bcec53cbf
Closes-bug: #1630153
2016-10-11 08:53:16 +02:00
Ilya Chukhnakov d68a97fe47 K8s and Neutron clients support
Adds basic K8s client implementation and CONF-based singletons for
both Neutron and K8s clients.

The K8s client added by this patch should be considered a temporary
solution that only implements the necessary parts to let us move
forward with kuryr-kubernetes. Eventually it will be replaced by either
[1] or [2].

The problem with [1] is that it does not yet support the streaming API
that we need for WATCH. And [2] is outside of the OSt umbrella, so [1]
is preferred over [2] unless [2] makes it into global-requirements.txt.

[1] https://github.com/openstack/python-k8sclient
[2] https://pypi.python.org/pypi/pykube

NOTE: Removed py3-related code from config and top-level __init__.
      How to properly deal with that code is TBD.

Change-Id: Ib4eb410eaf9725c296fcdddd8857eb24b8929915
Partially-Implements: blueprint kuryr-k8s-integration
2016-10-03 16:07:03 +00:00
Jaume Devesa aa0139e56b Override python test command on python2.7
Right now kuryr-kubernetes is only compatible with python3.5 (until
maybe a change in a future). This commit overrides the command to
run on python2.7 to do a dummy call and avoid fails on CI.

It also sets python3.5 as default at running only 'tox'

Change-Id: I2f342588a62a6fc3112978f6bc0f5917119348ff
Signed-off-by: Jaume Devesa <devvesa@gmail.com>
2016-09-05 12:26:23 +02:00
Jaume Devesa 86e35666c4 Introduce `kuryr-k8s` service
This commit introduces the `kuryr-k8s` service by adding the service
binary and focusing on loading configuration options.

The configuration options are inherited from kuryr-lib project
(http://github.com/openstack/kuryr) and loaded at runtime, together with
the project ones.

These configuration options can be also generated using the
`oslo-config-generator` utility by using:

    tox -e genconfig

The service runs as any other OpenStack-based service:

    kuryr-k8s [--debug] [--config-file foo] ...

Partial-Implements: blueprint kuryr-k8s-integration
Change-Id: I7e52aef8fb2767dcc46317f2212f4285a17b11da
Signed-off-by: Jaume Devesa <devvesa@gmail.com>
Co-Authored-By: Taku Fukushima <f.tac.mac@gmail.com>
2016-08-29 11:01:50 +02:00
Gal Sagie 04a95048a4 cookiecutter commit for kuryr-kubernetes
Change-Id: Ie6bb10929397918420481a1063cc1187c0951981
2016-05-22 08:54:07 +03:00