- Disable auto discovery in setuptools
This is to avoid issues with latest setuptools after version 61.0
For more info see [1]
- add bash script to allowlist in tox.ini
- use default size for vm memory
[1] https://github.com/pypa/setuptools/issues/3197
Change-Id: Iae24917add1aae6b1ed46dba0d2c270b39c5698c
The lower-constraints test was removed because of an issue where pip
could not correctly determine the required packages versions to install,
ending in an almost infinite loop that would end up in timeout, failure,
and general mayhem.
Recently the issue has been fixed and, if properly configured, the
lower-constraints test can provide good indication of which minimum
versions are required to support the current code.
This patch adds the test back to the current development branch, and it
runs only on master.
The lower-constraints file will stay in the future stable branches.
Change-Id: Ic9cef3e56266c6e9de0936b5f113e8b38d705a9b
As discussed during the upstream ironic community meeting on
Monday Dec 14 2020, the lower-constraints job is being removed.
Change-Id: I9392117ccdef8fc6ff3d95d667107d752459cb24
Debugging unit test failures is very challenging because all of the log
output is mixed together. Capture the log messages and store them as
part of the test, so that only log messages associated with failures are
output, interleaved correctly with the results.
This does not capture logs sent to stdout by _early_log(), although that
would be a nice further improvement.
Change-Id: I01e409ea73ff444e16caae0078e81585c703d5a5
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 missing constraints to the bandit environment.
Change-Id: I037dc04ffc4f426c828667df010ebe4e357e7fda
The doc8 module explicitl supports Python 3.6 starting from version
0.8.1
Also remove it from test-requirements as we already have it in tox.ini
Change-Id: Idc66758dc350d9a7a09b4295b08f4423cec288dc
* Remove pep8 dependencies from test-requirements, they're not
needed there and are hard to constraint properly.
* Add cliff to l-c (same version we have on ironic)
Change-Id: I8e7582492276db2308217460af37f691fb99c0ce
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: I1e134bb72b6fef3fba8f20d3b3d65520c66bbbf1
They're not easily discoverable there, let's keep them in tree.
The examples have been restructured to have two different projects
ready to be copied and adjusted. PEP8 failures have been fixed.
Change-Id: I2af04f4b7f9a2109fe83ec517e716159331a48bb
Co-Authored-By: Jay Faulkner <jay@jvf.cc>
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: I6c91e84366dcec7290456eea535a0b2bd3eda4d1
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:
* Wheel is not needed for python 3 only repo
* Some other sections are obsolete
- Update classifiers
- Update requirements, no need for python_version anymore
- Use sphinx-build
Change-Id: I8abd764d97a6711d3e6347ec3a7b8967f1512006
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: I96758527bbba9d8ec298867390b25be493f57789
It's horribly outdated and can be easily regenerated locally.
A similar change has been done to ironic long ago.
Change-Id: I5b7a0079bc90320adc2b4710cdee714d278e543c
Due to the way we currently define install_command, all test targets
are using upper-constraints, including the lower-constraints one.
This patch fixes it and adds standard things like passing proxy settings.
Change-Id: I61c3b45ae591ea44688f29598cb8b802bb094423
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: I092d686ba38723d7951e8f06415f28cc809ad365
Story: 2005791
Task: 33563
the imagebuild/common/generate_upper_constraints.sh
is currently failing as the curl command in this file does not
handle redirects.
Instead of allowing redirects, use the proper current link to the
upper constraints file.
Change-Id: I92c5bfa65ba149687f61172c2a89ff38660a58cf
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
Also adjust requiremenst to past the gate checks.
Change-Id: If7a0ebd9cca26cb67eb2ec9036d0aa2693fdffbf
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: I3c8e5c663a3fd881430f84fc502e46192de77fc7
W503 according to the [1] pycodestyle docs is not supposed to be
enabled. But it is.
W503 is something we will likely never enable as it is a personal
style decision and can change depending on the code. There is no one
right answer. Interestingly there is also a W504 which is the opposite
check.
[1] http://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
Change-Id: I1025f21a57837e97280f82baba50fdd823a190cc
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: I8d773d4ee3d0835fb2a9183fe2154e82db085bd5
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Curly quotes usually input from Chinese input method.
When read from english context, it makes some confusion.
Change-Id: Ife984be980a4235d9b14152143e2b3540e414751
Don't create *.pyc files during unit/functional tests as they just add
cruft during tox runs.
This is similar to what we already do in openstack/ironic
Change-Id: Id4364519903db20308f78f2aaeca3ad2d37b298a
When running the tox tests, use the default version of Python 3. Instead
of having to update the Python 3 version as we move from
py34 -> py35 -> py36 -> py37 -> py38
Just use the default version of Python 3 on the system.
This will not affect what gets run in the gate, as the version is
explicitly specified when it runs there. This is for developers who run
the tests locally.
Change-Id: I005d85b7d8f84f5471db3c3da279c5cf9cf13d4e
The Zuul v3 job is looking for the log files from the release notes
in: .tox/releasenotes/log/ but we had then in .tox/venv/log/
Fix it to where the Zuul v3 job expects it to be.
Also updated the 'docs' job, even though job isn't failing. If the job
did fail, with current setup, no log files would be copied which would
make debugging more difficult. This change will make it so the log
files are copied.
Change-Id: I5c036db1a9e94ca28e26fd7b45475d52223f5f0e
Recent update brought os-testr 1.0.0 that already uses stestr test
runner instead of testrepository. This patch migrates those places
using testrepository to using stestr.
Inspired by the patch of the same name in openstack/ironic
Change-Id: I2c1b271550629437627f3f62b6f33e2beb2b3c4b
Enable the following off-by-default checks:
* [H204] Use assert(Not)Equal to check for equality.
* [H205] Use assert(Greater|Less)(Equal) for comparison.
* [H210] Require ‘autospec’, ‘spec’, or ‘spec_set’ in
mock.patch/mock.patch.object calls
Increase the version of hacking in test-requirements so that can use new
off-by-default checks.
No changes to code were required.
Change-Id: I98aa484dc5414ee49c281dfd40e44b3c613d53e0
On some platforms using ’ instead of ' causes problems for
tox to be run. This patch fixes this at the same time not
causing any readability issues.
Change-Id: Icf8e4a9aa42dce64afb0d15ca7ff005478dbbfa7
Uses oslo_debug_helper to run up the tests in single-threaded
mode so that pdb works.
Examples:
# Run all tests.
tox -e debug
# Run a specific test or set of tests.
tox -e debug module.to.my.test
Change-Id: I272f6aa34bafcd7ac2d2828cbd6dd48e0e615b79
Specify 'ironic_python_agent' as the name of the application for the
flake8-import-order plugin. That way it knows that imports of
ironic_python_agent should come after external libraries.
Change-Id: Id39d558a51aeb97d96633afea28676634547d0d7
Use the flake8 plugin flake8-import-order to check import ordering. It
can do it automatically and don't need reviewers to check it.
Change-Id: I946457e9079ce0b54c7fe0ad554d024a1c61dce0
The old generate_sample.sh is broken already as it refers to
non-existing openstack/common path.
Let's use oslo-config-generator as many other OpenStack projects do.
Also, where applicable, option descriptions are updated with the
corresponding kernel parameters to set those options durig pxe boot.
Change-Id: Id4a0df30ea573d52f3b359f357fe8f4a29751939