tox 4 is significantly faster when it comes to creating virtualenvs and
is far better and detecting e.g. changes to requirements. tox 4.3.0
includes many of the fixes for bugs introduced by tox 4.0 and is a good
default candidate.
Change-Id: I0bb7f75ed3e03965ecd4d260c1299b46dcbf4b1b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is more trouble than it's worth now. Black takes care of this for
us. I wish I'd decided this before the blackify series :(
Change-Id: Ifee786c96b6f0bcd96008fed2b3ed3257d02c07c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I8048746dbc2ef0cb582f68934734db4c1153d779
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We want to bump the versions of hacking, but doing so requires changes
in two places: '.pre-commit-config.yaml' and 'tox.ini'. This is silly:
we can simply use tox to handle pre-commit and leave all other
dependencies to pre-commit. Do this, migrating bandit to pre-commit and
bumping the other dependencies in the process.
We remove the 'fast8' target and tool, since pre-commit is plenty fast
here.
Change-Id: Ifdc582ecc3b4479ea9ed9abcb16577c6e8b2f5c1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We had previously indicated that people use 'quota set' for unsetting a
project's quotas, however, there was nothing that actually allowed us to
do this. Correct that oversight.
Change-Id: I04057e766b8ccf94bf219972249b68dc2bb796d4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The tox option to skip source distribution building is skipsdist,
but this seems to be often misspelled skipdist instead, which gets
silently ignored and so does not take effect. Correct it
everywhere, in hopes that new projects will finally stop copying
this mistake around.
See https://tox.readthedocs.io/en/latest/config.html#conf-skipsdist
and https://github.com/tox-dev/tox/issues/1388 for details.
Change-Id: I05c1cc0c2fbf77021cc1e05bc96bee03528c69f0
The egg for the keystoneauth project is actually called keystonauth1.
Seems newer pip actually complains about the difference and fails.
Change-Id: I1602832d33cd467745a03b36c9b1545cd069ba1d
pip 20.3 finally includes a proper dependency resolver. Its use is
causing the following error messages on the lower-constraints job:
ERROR: Cannot install ... because these package versions have
conflicting dependencies.
The conflict is caused by:
bandit 1.1.0 depends on PyYAML>=3.1.0
cliff 3.4.0 depends on PyYAML>=3.12
openstacksdk 0.52.0 depends on PyYAML>=3.13
Bump our lower constraint for PyYAML to resolve this issue. With that
resolved, we see a new issue:
ERROR: Could not find a version that satisfies the requirement
cryptography>=2.7 (from openstacksdk)
ERROR: No matching distribution found for cryptography>=2.7
This is less self-explanatory but looking at the lower-constraints for
openstacksdk 0.52.0 shows a dependency on cryptography 2.7 [1], meaning
we need to bump this also.
Next up, flake8-import-order seems to cause the dependency resolver to
go nuts, eventually ending with the following error message in a Python
3.6 environment:
Using cached enum34-1.1.2.zip (49 kB)
ERROR: Command errored out with exit status 1:
command: ...
cwd: ...
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File ".../lib/python3.6/site-packages/setuptools/__init__.py", line 7, in <module>
import setuptools.distutils_patch # noqa: F401
File ".../lib/python3.6/site-packages/setuptools/distutils_patch.py", line 9, in <module>
import re
File "/usr/lib64/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
A quick Google suggests this is because the enum34 package is not
complete [2]. We shouldn't even be using it since our base virtualenv
should at least use Python 3.6, but I guess some dependency doesn't
properly restrict the dependency to <= Python 3.4. This is moved from
'test-requirements.txt' to 'tox.ini' since we don't need to use our
constraints machinery for linters.
Finally, the versions of bandit and hacking that pip is bringing in both
requires in a newer version of babel, which in turn requires a new
version of pytz.
Collecting hacking>=2.0.0
...
ERROR: Cannot install oslo.i18n because these package versions have
conflicting dependencies.
The conflict is caused by:
babel 2.9.0 depends on pytz>=2015.7
babel 2.8.1 depends on pytz>=2015.7
babel 2.8.0 depends on pytz>=2015.7
babel 2.7.0 depends on pytz>=2015.7
Seeing as we shouldn't be tracking bandit in
lower-constraints, I'm not sure why we're want to bump these
dependencies for just that. As above, we move these dependencies out of
'test-requirements' and into 'tox.ini' since we can do that for linters.
[1] https://opendev.org/openstack/openstacksdk/src/tag/0.52.0/requirements.txt#L19
[2] https://github.com/iterative/dvc/issues/1995#issuecomment-491889669
Change-Id: I8ec738fbcabc8d8553db79a876e5592576cd18fa
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.
Change-Id: I35a367505b2b423c345b05519e4134113cb66648
We've depended on openstacksdk for config for ages now, clean up
after ourselves and stop installing it in tests.
Change-Id: I66b3ec2a36bc462d2f1ac151e95ccbdc946076b8
Remove python 2 from envlist parameter. Check the link:
https://etherpad.openstack.org/p/drop-python2-support
The plan is drop the python 2 support from OpenStack in Ussuri release.
Remove the zuul jobs.
Note that the (non-voting) openstackclient-check-plugins job is still
running under py2 at this time. That will need to be fixed in the
python/openstackclient repository where the job is defined.
Change-Id: I3148db053b9ef0fcf7dc88e5cc075d974c93d819
Adds a dependency on and invocation of the `whereto` command to validate
redirects in the .htaccess file during doc builds.
Change-Id: Ib6cc2953f0fd774de3c3a0c8a2bd6cff49667c14
Pick up newer versions of this library. Thankfully no serious changes
are needed.
Change-Id: I69e523844529fc1c8aa0c1ce764182dbe29cfeb6
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
While running `tox` command in binoic env, we see the following
message,
ERROR: InterpreterNotFound: python3.5
It is because the default py3 version for binoic is py36.
This patch adds the env in OSC also maintaining consistency
with setup.cfg
Change-Id: I8e5cf72901cba34ad44f2b356609f85b3b0c431f
In order to support switching auth contexts, such as for registered_limits
which take a system scoped token, switch the functional tests to using
the --os-cloud command line parameter. However, honor the OS_CLOUD env var
as a way that someone can select a different cloud, including 'envvars',
to use.
Use devstack-system-admin cloud for limit tests
Keystone requires these to have system scope now.
Change-Id: Ia81eebd3e00ae986cf3ba7e3d98f3e8a1647b622
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: I051f1c18b719a27372b626d483e47327085dd3b7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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: I4a4ca9726fab1d0cf9a33311201b7f65951a0942
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Change I7e8c47dead1e019e8705db3ff7559dd39b1d90d9 broke
the ability to create a new release note from the venv
tox target because the reno requirement was moved from
test-requirements.txt. This fixes it.
Change-Id: Ifac83121388728fa445e0ed4433c9d981c057737
The zuul job figures out whether to run "setup.py build_sphinx" or
"build-sphinx" based on whether the project is relying on pbr's
ability to auto-generate API reference docs. Because we are relying on
that, we want local builds to use "setup.py build_sphinx".
This reverts commit 42e0037cd0.
Change-Id: Ia01188110fa9c3ccaf3d794fa3a511a6780e683e
This commit makes to use stestr instead of ostestr
directly. ostestr>1.0.0 has started to use stestr instead of
testrepository. So there is no reason to use ostestr anymore.
Change-Id: I6327d50c9f6dd19f1de24b9b51532104fb3e916e
Do a dummy import to determine which SDK is installed (Pre/post merge).
This solves the DevStack error "Cloud defaults was not found" in -tips jobs.
Depends-On: Ia111f127fbdceac2afe20fd9d1fe032145cdd72c
Change-Id: I60c2d418dd5a393eee2cc2a5c2fdebfffdabf2d3
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: I9f818d4b78e7540498a1501be14cd63ac3e891b3
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: Ie7c06ead39c8597ec9326f223625d1fa0d5208d1
Both of these can severely break openstackclient. Add them to the
required-projects list of the tips jobs. We should then add at least
osc-tox-unit-tips but maybe also osc-functional-devstack-tips to both
cliff and keystoneauth so that it's symmetrical.
Change-Id: Ie0f3e9d7e221c9cdd3c5d726148f456246186ff4
* Add unit-tips job to run unit tests with the same project master branches
as the functional-tips job (mostly useful for the unit.integ tests)
* Add irrelevant-files to the osc-functional-devstack-base job
* Comment out the functional-n-net job as it is horribly broken for now
until the replacement package-installed OpenStack is ready
Change-Id: I5acdcb0a2f0f0dfe488740ae0add36366cc0ee21
The functional tests assume that an openrc file has been sourced. Make a
simple wrapper that will do that.
Change-Id: I42584aaebcbca99a8c922f6ff90c8bbce57bbfbb