Remove py2 testing, jobs

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
This commit is contained in:
Brian Rosmaita 2019-11-22 10:11:52 -05:00
parent 0c6dd98d01
commit 40bd312410
3 changed files with 89 additions and 81 deletions

View File

@ -32,6 +32,8 @@
name: glance-tox-oslo-tips-base
parent: tox
abstract: true
nodeset: ubuntu-bionic
timeout: 2400
description: Abstract job for Glance vs. oslo libraries
# NOTE(rosmaita): we only need functional test jobs, oslo is
# already running periodic jobs using our unit tests. Those
@ -58,12 +60,13 @@
- name: openstack/taskflow
- job:
name: glance-tox-functional-oslo-tips
name: glance-tox-functional-py37-oslo-tips
parent: glance-tox-oslo-tips-base
description: |
Glance py27 functional tests vs. oslo libraries masters
Glance py37 functional tests vs. oslo libraries masters
vars:
tox_envlist: functional
python_version: 3.7
tox_envlist: functional-py37
- job:
name: glance-tox-functional-py36-oslo-tips
@ -71,12 +74,15 @@
description: |
Glance py36 functional tests vs. oslo libraries masters
vars:
python_version: 3.6
tox_envlist: functional-py36
- job:
name: glance-tox-keystone-tips-base
parent: tox
abstract: true
nodeset: ubuntu-bionic
timeout: 2400
description: Abstract job for Glance vs. keystone
required-projects:
- name: openstack/keystoneauth
@ -84,12 +90,13 @@
- name: openstack/python-keystoneclient
- job:
name: glance-tox-py27-keystone-tips
name: glance-tox-py37-keystone-tips
parent: glance-tox-keystone-tips-base
description: |
Glance py27 unit tests vs. keystone masters
Glance py37 unit tests vs. keystone masters
vars:
tox_envlist: py27
python_version: 3.7
tox_envlist: py37
- job:
name: glance-tox-py36-keystone-tips
@ -97,15 +104,17 @@
description: |
Glance py36 unit tests vs. keystone masters
vars:
python_version: 3.6
tox_envlist: py36
- job:
name: glance-tox-functional-keystone-tips
name: glance-tox-functional-py37-keystone-tips
parent: glance-tox-keystone-tips-base
description: |
Glance py27 functional tests vs. keystone masters
Glance py37 functional tests vs. keystone masters
vars:
tox_envlist: functional
python_version: 3.7
tox_envlist: functional-py37
- job:
name: glance-tox-functional-py36-keystone-tips
@ -113,23 +122,27 @@
description: |
Glance py36 functional tests vs. keystone masters
vars:
python_version: 3.6
tox_envlist: functional-py36
- job:
name: glance-tox-glance_store-tips-base
parent: tox
abstract: true
nodeset: ubuntu-bionic
timeout: 2400
description: Abstract job for Glance vs. glance_store
required-projects:
- name: openstack/glance_store
- job:
name: glance-tox-py27-glance_store-tips
name: glance-tox-py37-glance_store-tips
parent: glance-tox-glance_store-tips-base
description: |
Glance py27 unit tests vs. glance_store master
Glance py37 unit tests vs. glance_store master
vars:
tox_envlist: py27
python_version: 3.7
tox_envlist: py37
- job:
name: glance-tox-py36-glance_store-tips
@ -137,15 +150,17 @@
description: |
Glance py36 unit tests vs. glance_store master
vars:
python_version: 3.6
tox_envlist: py36
- job:
name: glance-tox-functional-glance_store-tips
name: glance-tox-functional-py37-glance_store-tips
parent: glance-tox-glance_store-tips-base
description: |
Glance py27 functional tests vs. glance_store master
Glance py37 functional tests vs. glance_store master
vars:
tox_envlist: functional
python_version: 3.7
tox_envlist: functional-py37
- job:
name: glance-tox-functional-py36-glance_store-tips
@ -153,12 +168,15 @@
description: |
Glance py36 functional tests vs. glance_store master
vars:
python_version: 3.6
tox_envlist: functional-py36
- job:
name: glance-tox-cursive-tips-base
parent: tox
abstract: true
nodeset: ubuntu-bionic
timeout: 2400
description: Abstract job for Glance vs. cursive and related libs
required-projects:
- name: x/cursive
@ -166,12 +184,13 @@
- name: openstack/castellan
- job:
name: glance-tox-py27-cursive-tips
name: glance-tox-py37-cursive-tips
parent: glance-tox-cursive-tips-base
description: |
Glance py27 unit tests vs. cursive (and related libs) master
Glance py37 unit tests vs. cursive (and related libs) master
vars:
tox_envlist: py27
python_version: 3.7
tox_envlist: py37
- job:
name: glance-tox-py36-cursive-tips
@ -179,15 +198,17 @@
description: |
Glance py36 unit tests vs. cursive (and related libs) master
vars:
python_version: 3.6
tox_envlist: py36
- job:
name: glance-tox-functional-cursive-tips
name: glance-tox-functional-py37-cursive-tips
parent: glance-tox-cursive-tips-base
description: |
Glance py27 functional tests vs. cursive (and related libs) master
Glance py37 functional tests vs. cursive (and related libs) master
vars:
tox_envlist: functional
python_version: 3.7
tox_envlist: functional-py37
- job:
name: glance-tox-functional-py36-cursive-tips
@ -195,22 +216,21 @@
description: |
Glance py36 functional tests vs. cursive (and related libs) master
vars:
python_version: 3.6
tox_envlist: functional-py36
- project:
templates:
- check-requirements
- integrated-gate
- integrated-gate-storage
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-train-jobs
- openstack-python3-ussuri-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:
jobs:
- openstack-tox-functional
- openstack-tox-functional-py36
- openstack-tox-functional-py37
- glance-code-constants-check
- devstack-plugin-ceph-tempest:
@ -230,8 +250,6 @@
- ^tools/.*$
- ^tox.ini$
- ^\.zuul\.yaml$
- tempest-full:
irrelevant-files: *tempest-irrelevant-files
- tempest-integrated-storage:
irrelevant-files: *tempest-irrelevant-files
- grenade-py3:
@ -239,19 +257,17 @@
gate:
jobs:
- openstack-tox-functional
- openstack-tox-functional-py36
- openstack-tox-functional-py37
- tempest-full:
irrelevant-files: *tempest-irrelevant-files
- tempest-integrated-storage:
irrelevant-files: *tempest-irrelevant-files
- grenade-py3:
irrelevant-files: *tempest-irrelevant-files
experimental:
jobs:
- glance-tox-py27-glance_store-tips
- glance-tox-py37-glance_store-tips
- glance-tox-py36-glance_store-tips
- glance-tox-functional-glance_store-tips
- glance-tox-functional-py37-glance_store-tips
- glance-tox-functional-py36-glance_store-tips
- barbican-simple-crypto-devstack-tempest
- glance-dsvm-grenade-multinode
@ -275,31 +291,31 @@
# to define these jobs in the openstack/project-config repo.
# That would make us less agile in adjusting these tests, so we
# aren't doing that either.
- glance-tox-functional-oslo-tips:
- glance-tox-functional-py37-oslo-tips:
branches: master
- glance-tox-functional-py36-oslo-tips:
branches: master
- glance-tox-py27-keystone-tips:
- glance-tox-py37-keystone-tips:
branches: master
- glance-tox-py36-keystone-tips:
branches: master
- glance-tox-functional-keystone-tips:
- glance-tox-functional-py37-keystone-tips:
branches: master
- glance-tox-functional-py36-keystone-tips:
branches: master
- glance-tox-py27-glance_store-tips:
- glance-tox-py37-glance_store-tips:
branches: master
- glance-tox-py36-glance_store-tips:
branches: master
- glance-tox-functional-glance_store-tips:
- glance-tox-functional-py37-glance_store-tips:
branches: master
- glance-tox-functional-py36-glance_store-tips:
branches: master
- glance-tox-py27-cursive-tips:
- glance-tox-py37-cursive-tips:
branches: master
- glance-tox-py36-cursive-tips:
branches: master
- glance-tox-functional-cursive-tips:
- glance-tox-functional-py37-cursive-tips:
branches: master
- glance-tox-functional-py36-cursive-tips:
branches: master

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of Glance
to support py2.7 is OpenStack Train (Glance 19.x). The minimum
version of Python now supported by Glance is Python 3.6.

70
tox.ini
View File

@ -1,10 +1,16 @@
[tox]
minversion = 2.3.1
envlist = functional-py37,py37,py27,functional,pep8
minversion = 3.1.0
# python runtimes: https://governance.openstack.org/tc/reference/runtimes/ussuri.html
envlist = functional-py37,py37,py36,pep8
skipsdist = True
skip_missing_interpreters = true
# this allows tox to infer the base python from the environment name
# and override any basepython configured in this file
ignore_basepython_conflict=true
[testenv]
# Set default python version
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
@ -29,45 +35,32 @@ whitelist_externals = bash
rm
passenv = *_proxy *_PROXY
[testenv:py27]
basepython = python2.7
commands = stestr run --slowest {posargs}
[testenv:py36]
basepython = python3.6
commands = stestr run --slowest {posargs}
[testenv:py37]
basepython = python3.7
commands = stestr run --slowest {posargs}
[testenv:py38]
commands = stestr run --slowest {posargs}
[testenv:functional]
basepython = python2.7
# this will use whatever the system python3 is
setenv =
TEST_PATH = ./glance/tests/functional
ignore_errors = True
commands =
stestr run {posargs}
commands = stestr run {posargs}
[testenv:functional-py36]
basepython = python3.6
setenv =
TEST_PATH = ./glance/tests/functional
ignore_errors = True
whitelist_externals =
bash
commands =
stestr run {posargs}
setenv = {[testenv:functional]setenv}
commands = {[testenv:functional]commands}
[testenv:functional-py37]
basepython = python3.7
setenv =
TEST_PATH = ./glance/tests/functional
ignore_errors = True
whitelist_externals =
bash
commands =
stestr run {posargs}
setenv = {[testenv:functional]setenv}
commands = {[testenv:functional]commands}
[testenv:functional-py38]
setenv = {[testenv:functional]setenv}
commands = {[testenv:functional]commands}
[testenv:gateonly]
# NOTE(rosmaita): these tests catch configuration problems for some code
@ -75,14 +68,12 @@ commands =
# so they don't affect local development
# TODO(someone other than me): figure out how to make these changes either
# automatic or unnecessary
basepython = python3
setenv =
TEST_PATH = ./glance/tests/gate
commands =
stestr run {posargs}
[testenv:pep8]
basepython = python3
commands =
flake8 {posargs}
# Run security linter
@ -91,7 +82,6 @@ commands =
doc8 {posargs}
[testenv:genconfig]
basepython = python3
commands =
oslo-config-generator --config-file etc/oslo-config-generator/glance-api.conf
oslo-config-generator --config-file etc/oslo-config-generator/glance-registry.conf
@ -101,7 +91,6 @@ commands =
oslo-config-generator --config-file etc/oslo-config-generator/glance-image-import.conf
[testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org.
deps =
@ -112,7 +101,6 @@ commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:bindep]
basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
@ -140,7 +128,6 @@ local-check-factory = glance.hacking.checks.factory
import_exceptions = glance.i18n
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
@ -150,11 +137,9 @@ commands =
whereto doc/source/_extra/.htaccess doc/test/redirect-tests.txt
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
@ -162,7 +147,6 @@ commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source glance --parallel-mode
commands =
@ -172,21 +156,23 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:debug]
basepython = python3
# this will use whatever the system python3 is
commands =
oslo_debug_helper {posargs}
[testenv:debug-py27]
[testenv:debug-py36]
commands =
oslo_debug_helper {posargs}
[testenv:debug-py35]
basepython = python3.5
[testenv:debug-py37]
commands =
oslo_debug_helper {posargs}
[testenv:debug-py38]
commands =
oslo_debug_helper {posargs}
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt