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: I82a7dfcb97be7719c27654733907168464c14a88
This environment was used by SQLAlchemy 1.4 and is no longer necessary
since SQLAlchemy was bumped to 2.0 .
Change-Id: Ibc7b1ce4ab71d81f5ee064da208bb1dd2f5dba36
The tox deps option grants installation of single dependencies and
requirements, optionally pinned using constraints, before installing
a package, therefore not granting installation of the correct
constraint during the package installation.
To fix that tox 4.4.0 has introduced the constrain_package_deps
option [1]
[1] https://tox.wiki/en/4.12.1/faq.html#using-constraint-files
Change-Id: Ied659411bffb3f37e67523bc50a6a03b19cceef6
Second in a series of commits to add Codespell to Ironic Repos. This one adds the command that was used to fix the spelling errors.
Future Commits will add CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.
Change-Id: I2e356fb4dea543d6e57614394d439a6767498f8d
It's nice to keep coverage high, but with little active development
it starts merely hindering refactorings, causing us to gradually lower
the expected minimum anyway.
Change-Id: I4bec5dbb224c59048c24cf2189a80014d63bfa36
This was merely obscuring a bug in pbr. setuptools doesn't do the
auto-discovery when pbr is in use. Remove it.
Also fixes the environments list where it is now validated for what is
installed by removing functional-py38, and fixing the job to just be
"functional".
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/pbr/+/869082
Change-Id: Ife999840777f3c553f569d81cd826ef9d5a6765d
- Remove skipsdist that it was never supported and causes breakage
when used with usedevelop.
- disable setuptools autodiscovery
Change-Id: Icd107c69be1685af9eddf9cc9fe2236d5eb57c5a
Primarily remove the workaround added in
Ia6d512ff2ae417bab938cb095fbb0884d195010a which added
continued use of autocommit, which is incompatible with
SQLAlchemy 2.0.
Also set the environment for unit tests to report compatability
warnings, although it appears none are being reported at this time.
Also cuts out the db upgrade cruft to only use the online database
migration code through oslo_db's enginefacade, which has the smarts
to handle online or offline migrations.
And then, retools unit/functional test data storage to utlize sqlite,
and in that re-tooled the queries to prevent locking conditions
which could exist with queries, and some additional refactoring/cleanup.
Also, don't mock and test time.sleep().
Additionally, it looks like we have discovered the root cause of the
memory/connection leakage issue which has been observed, due to the
way lists of nodes are processed/returned.
This change was based upon the work in
I506da42a9891a245831f325e34bec92e0a3f33f0 which is included in
this commit as the entire database structure and interaction
has been modified for ironic-inspector.
Co-Authored-By: aarefiev <aarefiev@mirantis.com>
Story: 2009727
Task: 44132
Change-Id: Ic88eb9dec5fddc924a72d9a23c17a304954ebf46
Sync with ironic configuration to fix grenade job
Drop lower-constraints.txt and its testing (was [1])
Fix ironic-inspector-tempest-managed-non-standalone sine we're here
[1] https://review.opendev.org/c/openstack/ironic-inspector/+/840075
Change-Id: I9b08c6e61c39a0e5616e51256f76a19dc5fd00c0
Usage of usedevelop=True results in all requirements.txt dependencies
always installed (without constraints) even when requirements.txt
is not explicitly added. Override usedevelop for these environments.
Add requirements.txt to the 'docs' environment since it imports
the whole ironic in the process.
Create a separate doc/requirements.txt.
Change-Id: I352f21772ccd68b35806f46851f254edb7c24c60
Remove pep8 dependencies from test-requirements, they're not
needed there and are hard to constraint properly.
Change lower-constraints to make pip happy and not require infinite
time to calculate dependencies.
Change-Id: Id524ad2bd2994fefadd6a3ad728123a0a1a49dc8
Tox trying to install latest versions for building docs,
which may not be supported by stable and lower branches,
so should be restricted by respective version's upper-constraints.txt
Change-Id: Ic2a8a264e95ecd70902329fc5de3839625845129
On some locales and some versions of python these quotes might not
decode properly, causing tox to fail to run pep8 environment, so
let's change them to the usual ASCII ones.
Change-Id: Ib60844aa222c65c7862adf817c5cb73e1d1cf5f4
As recommended, since version 3.2.0 tox switches pip invocations
to use the module -m pip instead of direct invocation.
We set min version to 3.2.1 [1] to also fix the behavior of
--parallel--safe-build
[1] https://tox.readthedocs.io/en/latest/changelog.html#v3-2-1-2018-08-10
Change-Id: I64afec683ca3ac0e750ce30d689441d3517671b5
Using autospec ensures that mocked functions are called with correct
arguments, so it's highly desired to have it.
Change-Id: I9c8395adf852495d2ef6db732d727990e8abd5d7
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build with apidoc extension
- Use newer openstackdocstheme version
- Remove Babel requirement, this is not needed.
Change-Id: I4176d8002d45449171aa5f7a7caef196ab7900d0
76cbd2dbbb131224e73a4b7c4019c378d2bbaf20 added the docs
build requirement on sphinxcontrib-svg2pdfconverter which
needs the native rsvg-convert command. This change adds
the native package that provides that command to bindep.txt.
Also adds bindep env in tox.ini.
Change-Id: I72aa8695c058989b4a1aa62cbb5d5fda2ce348ad
Since removing support for Python 2, we changed the basepython
value to 3.
This means that all the tox tests run with the default python
version available in the system.
This is not quite correct when running on environment such as
py36, py37 or py38, since they imply running with different
Python versions based on the environment.
To enforce the correct version we need to add the option
ignore_basepython_conflict available since tox 3.1.0 [0].
[0] https://tox.readthedocs.io/en/latest/config.html#conf-ignore_basepython_conflict
Change-Id: Ia14bc6397a88f200277abc5485cab02eb3724e1b
Fix testenv which only installs test-requirement, also updated
upper constraint url.
mock minimum version is bumped to 3.0.0,
keystonemiddleware minimum version is bumped to 4.18.0.
Change-Id: I162bcf372598c2268c9c5e30947e49eedb0147e3
Adds bandit configuration template and exclude some of
tests that we don't want to fix for the moment.
Keeping job unvoted so that we can keep an eye on possible
issues while not breaking gate.
Change-Id: Icc055980c13696b29c512edf8c48abba924aa244
Story: 2005791
Task: 33563
Add initial API reference, which covers all inspector endpoits.
The conf.py and the tox environment are stolen from ironic.
Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com>
Change-Id: I5009e8708dcad8ab25380f7bf574125d6e758ef5
Minor project file structure adjustment, to move config-generator.conf
and policy-generator.conf into tools/ subdirectory.
Also exclude tools/ from dsvm jobs.
Change-Id: I3242401511b88bd9b677d9875481808783f890b8
During pycodestyle fix [0], the max code complexity is temporarily
increased to 18.
This patch is a follow up to restore previous complexity (value 15),
and refactor code causing C901.
[0] https://review.openstack.org/#/c/567066
Story: #2001985
Task: #19604
Change-Id: Id64c31c449761024504284dcadd2b6c9f4a97f00
According to Openstack summit session [1] stestr is maintained project
to which all Openstack projects should migrate.
Let's switch it then.
Also adjust requirements to pass the gate.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I79b2220c20a04e2e33360bc330b5b4b4124caf71
Signed-off-by: Chuck Short <chucks@redhat.com>
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: Ic87686868f784f0e1b514d6b899cc16240d88d61