Based on the python runtimes for 2023.2 [0], we should be running
functional jobs on python 3.9 and python 3.10. This patch adds
functional testenvs for python 3.10 and 3.11 (the latter for local
testing) to tox.ini so the appropriate zuul jobs can be defined.
The functional-py38 testenv is not removed from tox.ini, as it may
be useful locally.
Functional py39 and py310 jobs are added to the check and the gate.
The current openstack-functional-py38-fips job is not removed; a
py39 job has not yet been defined to replace it [1].
[0] https://governance.openstack.org/tc/reference/runtimes/2023.2.html
[1] b3cad4f7a3/zuul.d/jobs.yaml
Change-Id: Ibc21b107878f5ba50137da4082a7cbc6342d2aa9
PasteDeploy replaced pkg_resources with importlib_metadata[1] in 3.0.
This causes functional test failures because the line breaks in the
example configs from glance/tests/functional/__init__.py are read as a
"prefix" by PasteDeploy. For instance,
paste.filter_factory =
glance.api.middleware.version_negotiation:VersionNegotiationFilter.factory
is read as "\nglance.api.middleware.version_negotiation:VersionNegotiationFilter.factory".
This might be a bug in PasteDeploy or (quite unlikely) in
configparser.ConfigParser rather than in our code, so this issue should
be revisited at some point. For now, remove the cosmetic line breaks in
order to fix our gates.
[1] ef58c20961
Change-Id: I1e557e731cceb3cfbc4ebc3f0887adf372a91d1d
Since openstack release naming conventions has changed, current test
which check data migration version will not work as expected and same
is also blocking our gate. Removing this job and test to unblock the
gate.
NOTE: Going forward glance PTL/team needs to change the database
migration version without fail at the start of release cycle.
Change-Id: Idcb12a6c450d4ce4ee859e6e1f02fb71adf8c1d5
tox.ini started failing with Tox4 which had some
incompatible changes. One is passenv where we need
to pass each value in newline otherwise, it fails with
error:
failed with pass_env values cannot contain whitespace,
use comma to have multiple values in a single line,
invalid values found.....
Fixing tox.ini for tox4 changes.
Change-Id: I0a377c9329cef8b251b800018fc0d7f784008329
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Moving the py36 job to py38 based as well as
updating the python classifier also to reflect the same.
openstack-tox-functional-py36-fips job is left which can be moved
to py38|py39 based once that job is defined in openatck-zuul-jobs
repo.
openstack-tox-functional-py36-fips job will be migrated to py38 or py39
in followup patch as that need openstack-zuul-config changes too.
[1] https://governance.openstack.org/tc/reference/runtimes/zed.html
Change-Id: Id0813d9dc553dd424732079039349b42f6f3201b
This was already fixed in 4889dc1814185380d282ba13167b5f2eb3a4c0a9 but
we did not enforce this rule and reintroduced "bad" string
interpolations. This patch adds a hacking rule to prevent us from doing
this again in the future.
Change-Id: I96d9a157d3887286542859d67138ffdae5a589f1
In cases when a package is installed in tox's develop-inst phase upper
constraints are not used if it were not defined in 'deps' of the tox
target. This caused for example 'tox -e docs' to fail in case a package
introduced some branch incompatible change.
There are two option to fix this:
* add the upper constraints to 'deps' of the target (and pre-install
requirements for some cases) OR
* use it in the install_command
In the past the latter needed some extra attention (due to e.g. lower
constraints tests) and projects were encouraged to remove the
install_command, but nowadays this seems better fitting for some
project and easier to use. So this patch fixes the upper constraints
usage via the custom install_command and by removing it from 'deps'.
Change-Id: Iae07e1c5abde09874928951ac55c2d0355bcd244
Ignore the .eggs directory that is created by (among other things)
pbr. It contains eggs downloaded by setuptools to build, test, and
run plugins, but more to the point, it contains a README.TXT that
violates D001 (Line too long).
Change-Id: I60a5692f0061ae7568c5cdd4b8482f6b2a963261
We also remove hacking tests for this, along with those for iterkeys and
itervalues (no usage of these).
Change-Id: If5b46580078eb756651ac6118f502eccdc693646
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This adds a new tox target called functional-py38-rbac which enables
the new secure RBAC policy defaults for all functional tests. To do
this, the functional tests needed a little bit of extra work to
actually set those, and a new non-voting job is added to run these
in CI.
Related to blueprint policy-refactor
Change-Id: Id376193521671bdb0ebc08ea8e563578bbaa541f
This allows us to run unit tests and functional tests using Python3.9.
We also remove all testenv:py3* environments, since tox is able to infer
what version of Python to use from the environment name.
Change-Id: If9ce1475ddfc66c9b37cd3500af982bf3814bf60
This patch removes majority of the registry and it's related
endpoints and config options that has been deprecated for
removal in various releases.
Change-Id: I75014bd50bf382efebe56bd89c20ffefbdde25f5
The current job simply installs requirements constrained by
lower-constraints.txt. While it is nice to know that the
requirements files are compatible, it would be even better to
run some tests to actually check that the code runs using the
current lower-constraints.txt file.
Change-Id: I7a191ac44b004f840c986ded61341e43b35f1d49
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.
This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.
Change-Id: I08f4d4e3845bb98e208168f7c632e1e10263e022
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The venv target was inheriting the default deps, which appropriately
just includes the main project requirements and our test requirements.
We also use venv for reno creation and other miscellaneous things, so it
is good to get all potential requirements installed. This adds the
installation of our docs requirements in the creation of the venv
environment.
Change-Id: I8b232116e54e39243a009a195090f12ef1a56bd4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Update to hacking 3.0.
Enable local hacking checks again, newer flake has a different
interface.
Remove hacking and friends from lower-constraints, they are not needed
for installation.
Unbreak docs:
Don't build apidocs for hacking - blacklist in doc/source/conf.py.
Change-Id: Ib230d72be9f0288d77cecd2c5ee0ff7aa91fc086
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Update requirements: Remove sphinx, it's not needed for testing, add
pygments which is really needed.
- Update doc/requirements: Remove python 2.7 support
- tox.ini: Remove testing of po files, the infra scripts do this since
a long time
- Update conf.py, no need to import openstackdocstheme anymore.
Change-Id: I9d030eb450f2c7ae74c25b7564a01b8785503e5e
We were capped at a very old version of hacking. Hacking itself caps the
various linters it uses to remain consistent, so our pep8 job was not
checking quite a bit that current versions have added.
This raises that limit to the latest to get up to the level of other
projects and addresses the errors the updated linters uncovered.
Change-Id: I89a9d73fbd59606a649e26077acebc5c42873d67
Co-authored-by: Sean McGinnis <sean.mcginnis@gmail.com>
Instead of a default policy.json file, policy defaults are now defined
in code. An operator need not supply policy.json data except to the
extent they want to override the defaults. Currently an empty
policy.json is still shipped because it is expected by devstack, but
this can be removed later. A sample policy.yaml file can be generated
using the genpolicy tox environment.
This partly fulfils the requirements of the policy in code goal[1].
However, because policies don't map 1:1 with APIs, it will not be
possible to fully document the policies until changes are made in how
policies are applied as proposed in https://review.opendev.org/528021
Due to the fact that existing policy files may rely on a rule named
"default" to specifiy policies not explicitly listed in the policy.json
file, all policies that are not admin-only by default now default to
"rule:default", so that the "default" rule will continue to apply to
those policies that are not listed in policy.json.
To ensure that this yields the expected policy in a standard
policy-in-code config file, the default value of the "default" rule is
now the empty string "". This is a change; between the Queens release
and now the default was set to "role:admin" to match the value specified
in the default policy.json file. An installation relying on both the
"default" rule for some policies and the default value of the default
rule may end up with a more permissive policy after upgrading. It's
likely that no such policies exist in the wild, because prior to the
Queens release the default value for the "default" rule was "@" (allow
all requests), so anybody relying on this rule will surely have
specified it explicitly in their policy.json.
Policies whose default is "role:admin" no longer use the "default" rule.
Therefore existing policy.json files that rely on the "default" rule for
those policies, and who have specified a value for the "default" rule
that is more permissive, will result in a more restrictive policy after
upgrading. It is unlikely that any of these policies exist in the wild
either.
[1] https://governance.openstack.org/tc/goals/selected/queens/policy-in-code.html
Change-Id: I8d1ccf5844078cc0b1652fb1130794daf07cedbc
Change tox.ini so that all jobs are python3, and add explicit
unit/functional testenvs for the two ussuri python runtimes
(3.6 and 3.7).
Remove py2 jobs from .zuul.yaml and redefine the periodic "tips"
jobs so that they are testing with the ussuri python runtimes.
Added nodeset: ubuntu-bionic to the abstract base jobs so that
py3.7 is available.
Co-authored-by: Ghanshyam Mann <gmann@ghanshyammann.com>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>
Closes-bug: #1853693
Change-Id: I15467c34fc8466fa1724c5401dc879ae77c1922d
As eventlet ssl termination is broken with python 3 and
we won't be supporting python 2.7 anymore we will just
remove ssl termination to glance-api and expect the
termination being handled by something else, like HAProxy.
This patch also removes the broken ssl test job as the
non-existing feature is not broken anymore.
Change-Id: Iaf16dfcfdb3a2c93312dcad1ea1229e6b3c8caaa
Glance isn't explicitly installing requirements, so add requirements
as tox deps in such a way that they'll be properly constrained by the
current openstack upper-constraints.
This change also bumps the version of psycopg to that of the current
upper-constraints in test-requirements and lower-constraints. (The
version in our current lower-constraints is subject to the "could not
determine PostgreSQL version from '10.x'" error, which causes the
lower-constraints job to fail.)
Change-Id: I1bb5759e6b1e3f8545ab417617072a61323b59a7
Closes-bug: #1852356
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.
Note that redirects will be set up as well but let's point now to the
new location.
For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html
Change-Id: I17c97cb7655bdedc3927f4883b45ba4dcfc55516
Since defaulting to py3 our 2.7 jobs have actually ran against python 3
due to basepython not declared on our 27 evironments. This patch will
change that.
Change-Id: I4d97c0577460949e8636e9f26b1d4b60b109f5d1
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
Change-Id: I3c5d4e068ee5f2919a4061e8f7b78f724cd61724
Signed-off-by: Chuck Short <chucks@redhat.com>
Periodic tips jobs are failing because python 3.5 interpreter
is not available on testing nodes. It is decided that Stein
branch should be tested with python 3.6 version.
Renamed periodic tips jobs to 3.6 and added python 3.6 enviornment
in tox.ini to run periodic tips jobs against python 3.6
environment.
Change-Id: I8a763eff7c6524969b1fabf98ab0a5624954d8b3
Closes-Bug: #1822238
Add tox target and resolve issue with infinite recursion in
ExtraProperties class by directly using methods on the dict
class.
Closes-Bug: 1800601
Change-Id: Ie98c4287c8bd1c364655adb99c7a88d1d451496e
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: Ic9645685e0f9ae25b0b2b754b11e34d8aef41829
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Instead of doing two separate test runs, use the group_regex option to
stestr to group tests that cannot be run in parallel into the same
worker.
Change-Id: I3d69d5c72d69484f4e1c9c0b11122d0cf3703d60
Related-Bug: #1768077