Commit Graph

32 Commits

Author SHA1 Message Date
James E. Blair 3a5db84a33 Switch to nox
Like Zuul, replace our usage of tox with nox.

Change-Id: I18e2dffaf737f0b57020d50c1c18397ee5dc1362
2023-01-10 10:30:14 -08:00
Ian Wienand 610443d04b nodepool-functional-k8s: switch to microk8s
Switch this job to use microk8s, which should be more stable than
minikube on our Ubuntu testing hosts.

Depends-on: https://review.opendev.org/c/zuul/zuul-jobs/+/866953
Change-Id: I8e76581ea5cf4a4241aec48bc59086d7f17cd72a
2023-01-10 10:29:55 -08:00
James E. Blair 4c5fa46540 Require TLS
Require TLS Zookeeper connections before making the 4.0 release.

Change-Id: I69acdcec0deddfdd191f094f13627ec1618142af
Depends-On: https://review.opendev.org/776696
2021-02-19 18:42:33 +00:00
Zuul fdec14e019 Merge "Declare support for Python3.8" 2020-03-17 23:38:03 +00:00
Monty Taylor 325455dfd6 Stop using hacking for anything
We've had it in here as a way to pin pycodestyle. But that's not
worth the energy to deal with things like hacking now spewing
incorrect messages about our apache license headers not being
right even though they are. (it's because sdague dedcided that
nobody has more than 11 lines of header)

zuul just uses a bare flake8. Match that choice.

Change-Id: I5bc847d151801fd31281389ee65184e964ddd2a5
Depends-On: https://review.opendev.org/712778
2020-03-12 15:03:03 -05:00
Jeremy Stanley 0c9b96bf62 Declare support for Python3.8
Replace our tox-py36 job with tox-py38, extend the list of trove
classifiers for Python versions in package metadata, and replace the
"py35" in the tox.ini envlist with just "py3" so that folks running
`tox` unqualified on their systems will use whatever python3
interpreter they have on hand (odds are it's in our supported range
these days). Also uncap python-daemon so we use a version compatible
with Python >=3.8.

Change-Id: Ic464eefbd90ffaa2ef9079a23e7b15c167de3103
2020-03-11 20:17:45 +00:00
Simon Westphahl 5c309f44ac Make flake8 config compatible with latest version
New ignored errors/warning:
- W504: line break after binary operator
- E741: do not use variables named ‘l’, ‘O’, or ‘I’

Fixed issues:
- E117: over-indented

This was tested locally with flake8==3.7.9 with Python 3.8.

The currently used version of flake8 (2.6.2) is not compatible with
Python 3.8. Unfortunately the dependency is coming in via
diskimage-builder>=2.0 -> hacking<1.2.0,>=1.1.0 -> flake8<2.7.0,>=2.6.0

Change-Id: Idf8b6033232fdce91cb37c8396dab6cc27c75968
2020-01-20 15:52:28 +01:00
Monty Taylor d85fb24734 Update devstack settings and docs for opendev
The most important thing is that the URL for glean is actually
wrong, which causes jobs to fail.

Also, change documentation while we're changing things.

Depends-On: https://review.opendev.org/655133
Change-Id: I127a33bfc4a3e33249120dcc7ef6142ce4e52a97
2019-04-23 13:03:21 +00:00
Tristan Cacqueray c1378c4407 Implement an OpenShift resource provider
This change implements an OpenShift resource provider. The driver currently
supports project request and pod request to enable both containers as machine
and native containers workflow.

Depends-On: https://review.openstack.org/608610
Change-Id: Id3770f2b22b80c2e3666b9ae5e1b2fc8092ed67c
2019-01-10 05:05:46 +00:00
Monty Taylor a7c1f6a56a
Only set basepython once
Rather than setting it in all of the envs, set it in the main env. Then
add ignore_basepython_conflict option to tox.ini so that doing so
doesn't mess with py35, py36 and py37's python setting.

Change-Id: I72fa337b2b7be1823beeb3f3bfc4bd23589c007d
2018-11-06 10:48:37 -06:00
David Shrewsbury 511ffd9c29
Add tox functional testing for drivers
Reorganizes the unit tests into a new subdirectory, and
adds a new functional test subdirectory (that will be further
divided into subdirs for drivers).

Change-Id: I027bba619deef9379d293fdd0457df6a1377aea8
2018-11-01 15:33:44 +01:00
Zuul a9daee98fc Merge "Move sphinx + deps to doc/requirements.txt" 2018-09-03 12:22:03 +00:00
Andreas Jaeger 711d5f7b0e Update docs build job
Use tox -e docs for building with the new build-tox-docs template.
Update tox.ini to enable warnings as errors to follow previous
behaviour.

Change-Id: I8c4547c3e835515744b9a94ccfeb258989169051
2018-08-21 21:09:39 +02:00
Markus Hosch fe6b7ddfca Move sphinx + deps to doc/requirements.txt
Move all doc related requirements to a separate requirements.txt so
that the tests do not install unneccessary dependencies.

Change-Id: I276775ee2d038209f82bfb42dca386a2f5bf02f0
2018-08-16 09:57:52 +02:00
qingszhao 49c75b26fd 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: I397efa210d0489fcea1240a305b65f06511081f1
2018-06-12 01:02:57 +08:00
Monty Taylor 0c71102f0e
Switch to stestr
stestr is maintained, while testrepository is not. OpenStack is
migrating to stestr, go ahead and follow suit.

The --no-subunit-trace flag is added to keep the quiet test run
behavior. If we remove it, stestr will by default print the name of each
test as it starts it.

This uses environment inclusions which need tox 2.8.1 due to a bug fix.
So increase the tox minversion.

Change-Id: I08cd4bee86b56d9a68644b049497c34e34e5f226
2018-04-26 11:52:17 -05:00
Monty Taylor 0cb972b5b0
Update tox docs environment to match build-sphinx-docs
docs is a recommended developer convenience environment for doing the
sphinx build locally. The zuul job runs the sphinx-build command. Update
the docs env to do the same thing.

Move the job definitions in-tree - and also remove tox-docs.

Change-Id: Id810b8de1794b11b236eaa04940acbb754dd4b52
2018-02-07 17:55:58 -06:00
Tobias Henkel 924caa9496 Use same flake8 config as in zuul
Currently the flake8 config seems to be broken as only H231, H233 and
F are selected but nothing from the formatting checks (E). I think we
should use the same set as in zuul.

Change-Id: Ifd48129386d42e87be8326358d43fc1c0d8b0eac
2018-01-17 02:20:40 +00:00
David Shrewsbury e0ac89ccf9 Use py3 in docs generation
'tox -edocs' will annoyingly use py2 if it's available. Since
everything else is py3, do that for docs, too.

Change-Id: Ia8bbde27ad4d97fd6b0859536580a2268bda0933
2017-11-27 12:04:29 -05:00
David Shrewsbury 50d8b5d27f Set base environment as python3
We are python3 all the way down now.

Change-Id: Ibdb2bffc3f47ba35aa970cc0520075186c848299
2017-08-28 15:06:35 -04:00
Paul Belanger 5d423bee9a
Python 3.x incompatible use of print operator
Start working on low hanging fruit for python3 support.

Change-Id: I6d52c3a4ad4d383437925ecae6002de7528c9be0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-12 14:09:15 -04:00
Paul Belanger e22ee05171 Initial support for bindep
This gives us to ability to start manging OS dependencies for zuul.

Change-Id: Ic3c3848258354c3c6ecc866c48ac4a77bb3d187f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-11-25 09:51:26 +00:00
David Shrewsbury a0dca6ae12 Allow testing with external zookeeper
It can be handy to test against an already running zookeeper, rather
than requiring one be installed in your test environment. Allow for
that by using the NODEPOOL_ZK_HOST environment variable.

This also gives each ZKTestCase based test a pre-existing client
connection that can be used for testing. To avoid znode path conflicts,
each connection is chroot'ed under /nodepool_test/{uniqueInt}. We
attempt to remove the {uniqueInt} znode and children as part of the
test cleanup (also removed at setUp time if cleanup fails). This will
leave a single znode for /nodepool_test, but if many tests fail for
some reason, it is easier to remove a single root node rather than
potentially many of them if we do not chroot.

Change-Id: I4fd61b16353c16bed2744e0d863ce188019430cd
2016-07-07 16:32:06 -04:00
Ondřej Nový 2f67ab6677 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I055ab0b303769424a0973665632f3e4b3feafd08
2015-12-11 22:50:47 +01:00
James E. Blair b285596b91 Update tox.ini to current standards
The sdist step is unecessary (and requires a locally installed pbr).

Change-Id: I1514aab9cdd519442e1e191cf9b8a784b52fc83e
2015-10-15 07:55:04 -07:00
Clark Boylan 04614abf49 Check pyflakes rules
This will catch unused vars and unused imports and similar code hygeine
items. Note this doesn't enable the other rules because we are trying to
ignore some and enable others and that doesn't seem doable with the
select/ignore lists.

Change-Id: If88de411bb18b395c3be492c0a6dccec50fe98f2
2015-10-04 11:41:52 -04:00
Antoine Musso ba43590ffb Add tox 'docs' env to build Sphinx documentation
As per the governance resolution https://review.openstack.org/119875
projects should have a docs environment in their tox.ini testing
interface.

Change-Id: I5908033d835d35a0650b77b01ff727d81eb79eb0
2015-04-21 17:33:52 +02:00
Christian Berendt e3dd94d65c Use except x as y instead of except x, y
According to https://docs.python.org/3/howto/pyporting.html the
syntax changed in Python 3.x. The new syntax is usable with
Python >= 2.6 and should be preferred to be compatible with Python3.

Enabled hacking check H231.

Change-Id: Ide60f971493440311f1dcc594e33d536beb925e5
2014-05-29 23:57:48 +02:00
Clark Boylan a93bb48cf5 Fix tox's insane pip install command.
Override tox's pip install command so that prereleases (alphas, betas,
broken things) aren't installed by default. Instead only install release
versions unless a prerelease version is specifically provided. Do this
by overriding the tox install command value.

This fixes doc builds that use `tox -evenv python setup.py
build_sphinx`.

Also, remove the gearman servers from the test configuration (since there
is not yet any support for it).

Change-Id: I31913420adcb48866d3996f2dd3b605c55acce2e
2014-04-01 11:27:58 -07:00
James E. Blair faef2431a7 Finish initial docs
Finish the initial sections defined in the documentation index.
Add sphinxcontrib-programoutput to document command line utils.
Add py27 to the list of default tox targets.

Change-Id: I254534032e0706e410647b023249fe3af4f3a35f
2014-03-31 09:21:56 -07:00
Monty Taylor 6f2168ffca Ignore hacking warnings
Some of us have hacking installed global, which means nodepool flake8
produces a lot of spurious warnings. Suppress them.

Change-Id: Ie869a92fa423dc022c5c37c102f5a9071ccaf1b0
2013-09-13 11:09:15 -05:00
James E. Blair 5866f10601 Initial commit
Much of this comes from devstack-gate.

Change-Id: I7af197743cdf9523318605b6e85d2cc747a356c7
2013-08-15 09:47:23 -07:00