osc-placement functional tests are using the master version
of placement which is failing due to the constraints mismatch
on stable branches testing.
- https://zuul.opendev.org/t/openstack/build/a2cc830f28f44ed5ae0e1c5f0a99ac75
During the discussion in Nova meeting, we did not find any reason why
we are using the latest placement on stable branch testing of osc-placement
- https://meetings.opendev.org/meetings/nova/2023/nova.2023-01-10-16.00.log.html#l-47
Below is the original patch which started using the placement from master
source.
- https://review.opendev.org/c/openstack/osc-placement/+/651939
To avoid the constraints mismatch on stable branch testing which can
happen in future also, let's use it from pypi version which will be the
same way as nova functional tests doing
- 26f24b7086/tox.ini (L64)
Also, remove basepython/ignore_basepython_conflict from tox.ini. Tox 4.2.6
still failing with the missing interpreter for [testenv:functional{,-py38,
-py39,-py310}]. It is due to a conflict between basepython = python3
and the version fragment in the generative target suppressed by
ignore_basepython_conflict = true.
This patch removes basepython = python3 assuming that developers already
switched for python3 in their environment as python2.7 is EOL.
Ref: https://review.opendev.org/c/openstack/nova/+/869545
Change-Id: I4e3e5732411639054baaa9211a29e2e2c8210ac0
As per 2023.1 testing runtime[1], we need to test on Ubuntu
Jammy (which will be taken care by tempest and devstack patches
to move base jobs to Jammy) and at least single job to run on
Ubutnu Focal (for smooth upgrade). Also, python 3.10 testing is
voting now.
This commit makes python 3.10 functional job as voting and python 3.10
unit test job are voting via generic template. Python 3.8/3.9 jobs are
running on Focal and python 3.10 on Jammy.
[1] https://governance.openstack.org/tc/reference/runtimes/2023.1.html
Change-Id: I97b82399af9a640353ba979965c202afcb224163
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.
See also the PTI in governance [1].
I needed to squash in another change that is dropping the py36 and py37
support. We cannot do that separately as those jobs are already failing.
[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html
Change-Id: I378d5c3c1f3e96696670a4865caf5901269a5ee4
This patch also adds a non voting job calling the new target
Depends-On: https://review.opendev.org/760932
Change-Id: I37a2cded4f1685cfe433efe53154da12fedadce6
- Add some helpful descriptions for the various environments
- Use lower-case boolean values (they're prettier)
- Remove some unnecessary warning filters for issues not present on
Python 3.6+
- Move the 'venv' target to the end of the file, indicating its priority
(quite low)
- Fix a bit of wonky indentation
Change-Id: Ia083f959d2a9c974b4c0592fdada21dcc766dca4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
tox isn't all that clever when it comes to handling non-existent
environments with multiple factors. Without these explicit
'functional-pyNN' targets explicitly defined, attempting to run e.g.
'tox -e functional-py36' will actually end up running the default
'testenv', which run *unit* tests. This is almost certainly a bug in
tox, but we need to fix it here to get functional tests passing again.
Change-Id: If47eb0da2b04d7a288f53e80f0addd72edcd9e7a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
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
The functional-py36 and functional-py37 targets are
now redundant with their parent functional target
which is now using basepython=python3 so just running
tox -efunctional will run with whatever python3 environment
is on the host, e.g. py36 on standard ubuntu bionic:
$ python3 --version
Python 3.6.8
Change-Id: Ibb679e0cffa18291b91f10b19559d2a68e986486
The reno package dependency is in doc/requirements.txt which
needs to be in the tox venv target deps if you want to create
a release note using:
tox -e venv -- reno new <slug>
Change-Id: Ifa1fd55b2c8a3f65a74d9e5e2f0482d015c97723
- Don't remove badges - simply exclude them from the main docs.
- Don't include stuff that only makes sense in HTML - namely the indexes
- Don't explicitly set basepython in a tox testenv when we can inherit
it
Change-Id: Ib3db3888d0bb1c47773e3e44919c7077d0906ceb
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This follows the instructions [1] in an attempt to build pdf docs.
To get a build, the "badge" in the README has been removed.
The other option to add some svg -> pdf support, but that seems
overkill for a badge which is effectively meaningless.
The build wanted 'xindy' to build an index, but we can turn that
off and still get useful results.
[1] https://etherpad.openstack.org/p/train-pdf-support-goal
Change-Id: Icf7c22bf9d1de6fb2a74a756c370930d4c00b0b9
Story: 2006110
Task: 35397
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
This makes the output sooo much more readable.
Change-Id: I3376d2d97ebfd014006e69710c00d859491c92ce
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This removes the previously built docs so that
we get a fresh build each time to pick up the
latest changes.
Change-Id: I3c5da78f2aee85810eabe7c71cd89caa0d65e541
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: I7874fc8375c14fcc9567b6c23bc1c070bc6d29c9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
there are differences between oslo.config tox.ini and
placement-osc-plugin tox.ini .
Change-Id: I810c17e8f3bd1ac1f276869d69443ed2c47c8f7d
Closes-Bug: #1745471
Follow the python-novaclient approach of running functional tests
against a deployed Devstack in the gate.
Blueprint: placement-osc-plugin
Depends-On: I7c5a5c10288b356302bb3027837d4ed4f0fbad8c
Change-Id: I8ca156440cb51d03cb8e05185c028573dc6f9b4b