hacking 3.0.x is too old. This also removes the note about old behavior
of pip which has been changed in recent versions.
Change-Id: I5a8dc51a94c8284c9c869728981dcb19de63d941
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.
Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.
To avoid similar gate break in future, we need to bump the hacking min
version.
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html
Change-Id: Idc547f298dda460ba619cdbb873a2db3e631edf9
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
- Use newer openstackdocstheme version
- Remove install_command from tox.ini, the default is fine
- Update to hacking 3.0, fix warnings
Change-Id: If66a87c519ce82ee7890ac3e133afef13fb35bd2
Change the functional tests to use the PlacementFixture instead
of devstack as the source of a placement API. This speeds up
the tests considerably and lowers the number of dependencies.
There are four primary changes:
* For each test a PlacementFixture is instantiated, using the
usual in-RAM db and in-process placement.
* Because of some exceedingly confusing optimizations in
osc_lib and python-openstackclient, done to improve start
up time, a session to placement was caching the service
url. This meant that after a first test succeeded, every
subsequent one would not because it was trying to talk
to a fake hostname that was no longer being intercepted.
The workaround for this was to monkeypatch the method
in the ClientCache class which provides access to a client (per
service-type). The replacement method makes a new client
every time.
* The previous tests would subprocess out to a real call of
the openstack command and then interpret the results.
Now, a run() method on OpenStackShell is called instead.
This accepts arguments in the same way, but we need to
a) capture stderr and stdout, b) make a try/except for
SystemExit to get some error responses (mostly from
the argparse lib which has a tendency to exit for you
instead of politely telling you it wants to), c) deal
with errors from commands ourself rather than using
exceptions from the subprocess module.
Switching to this form means that logging becomes in-process
and more visible. To accomodate this the Capture fixture
from placement is used. This was chosen because we are already
pulling in the PlacementFixture. If this seems icky, I can fix
it with a local one. This was the shorter path.
* The legacy dsvm jobs have been removed in favor of "standard"
functional jobs for 2.7 and 3.6 that require openstack/placement.
The playbooks associated with the legacy jobs are removed.
tox.ini is adjusted to reflect this new setup. Because tox-siblings
functional is being used, we don't want to share tox envs with the unit
tests. The 3.5 functional job is removed because we no longer target
that.
After running these for a while it became clear that there were
intermittent failures being caused by subunit attachments being too
large. This was eventually traced back to logging from all packages
being set to DEBUG even when something else was requested. That was
traced back to a poor interaction between the way that osc does
logging and the way oslo_logging does logging (used by placement and
thus the placement fixture). The workaround, embodied in the
RESET_LOGGING list in osc_placement/tests/functional/base.py, is to
get and reset the log level for a subset of the packages that are
used.
Change-Id: I7deda200b372ff6a7ba67b0c4fa0e53c4fa16ffc
Story: 2005411
Task: 30428
The latter does not work well with Sphinx 2.0.
Switching brings us up to date with modern norms. The
changes made here are to get it working:
* Changing tox jobs to the modern style, with a separate
requirements.txt in the doc directory.
* Updating doc and releasenotes conf.py to use the new
theme and correctly point at storyboard for bugs
* Remove docs related requirements from test-requirements.txt
Change-Id: I9770f375b0fd7a6cacdd02e3d0381a28879f18b5
While trying to make some changes I discovered that the tox
configuration for osc-placement was rather out of date and
functional tests were not working for python3. With this
change we bring tox.ini into a style that is more in keeping
with modern standards, use stestr, and update some functional
tests so they work with python3.
The functional tests changes are either:
* to fix the decoding of response
* to adapt argparse error response checking between python
version.
These changes cascade some required change into how the gate-side
functional testing is performed. We make it explicit that in the
python2 job, the 'functional' tox job is run. When the python3
job is run, 'functional-py3' is run. Also stestr replaces
testr in the post-test hook.
When the functional-py3 test had been run in the past it
was actually running a python2 osc-placement against a
python3 devstack. We change that here to be python3 and
python3. Once that was happening, additional failures
were revealed, now fixed.
One particular issue was that while the json module
for python 3.6 and greater will decode strings or bytes,
the version of 3.5 will only do strings. We switch
to using simplejson throughout which smooths things over.
This is added as a new requirement but it isn't really:
simplejson is required by osc-lib.
Finally, some requirements need to be tuned to pass the
gate requirements job.
Change-Id: I999a3103dd85c0a437785766eef533875fca31fc