Merge "Stop testing Python 2"

This commit is contained in:
Zuul 2019-11-18 21:38:47 +00:00 committed by Gerrit Code Review
commit 474ef85764
6 changed files with 33 additions and 56 deletions

View File

@ -1,5 +1,10 @@
# See https://docs.openstack.org/infra/manual/drivers.html#naming-with-zuul-v3 # See https://docs.openstack.org/infra/manual/drivers.html#naming-with-zuul-v3
# for job naming conventions. # for job naming conventions.
# TODO(stephenfin): Remove 'USE_PYTHON3' once [1] or similar merges
#
# [1] https://review.opendev.org/#/c/649097/
#
- job: - job:
name: nova-dsvm-multinode-base name: nova-dsvm-multinode-base
parent: legacy-dsvm-base-multinode parent: legacy-dsvm-base-multinode
@ -24,17 +29,17 @@
- ^nova/test.py$ - ^nova/test.py$
- ^releasenotes/.*$ - ^releasenotes/.*$
- ^setup.cfg$ - ^setup.cfg$
- ^tests-py3.txt$
- ^tools/.*$ - ^tools/.*$
- ^tox.ini$ - ^tox.ini$
- job: - job:
name: nova-tox-functional name: nova-tox-functional-py36
parent: openstack-tox parent: openstack-tox
nodeset: ubuntu-bionic
description: | description: |
Run tox-based functional tests for the OpenStack Nova project with Nova Run tox-based functional tests for the OpenStack Nova project
specific irrelevant-files list. Uses tox with the ``functional`` under cPython version 3.6 with Nova specific irrelevant-files list.
environment. Uses tox with the ``functional-py36`` environment.
This job also provides a parent for other projects to run the nova This job also provides a parent for other projects to run the nova
functional tests on their own changes. functional tests on their own changes.
@ -48,35 +53,12 @@
- ^doc/(source|test)/.*$ - ^doc/(source|test)/.*$
- ^nova/locale/.*$ - ^nova/locale/.*$
- ^releasenotes/.*$ - ^releasenotes/.*$
vars:
# explicitly stating the work dir makes this job reusable by other
# projects
zuul_work_dir: src/opendev.org/openstack/nova
tox_envlist: functional
tox_install_siblings: true
timeout: 3600
- job:
name: nova-tox-functional-py36
parent: openstack-tox
nodeset: ubuntu-bionic
description: |
Run tox-based functional tests for the OpenStack Nova project
under cPython version 3.6 with Nova specific irrelevant-files list.
Uses tox with the ``functional-py36`` environment.
This job also provides a parent for other projects (notably placement)
to run the nova functional tests on their own changes.
required-projects:
# including nova here makes this job reusable by other projects
- openstack/nova
- openstack/placement
irrelevant-files: *functional-irrelevant-files
vars: vars:
# explicitly stating the work dir makes this job reusable by other # explicitly stating the work dir makes this job reusable by other
# projects # projects
zuul_work_dir: src/opendev.org/openstack/nova zuul_work_dir: src/opendev.org/openstack/nova
tox_envlist: functional-py36 tox_envlist: functional-py36
tox_install_siblings: true
bindep_profile: test py36 bindep_profile: test py36
timeout: 3600 timeout: 3600
@ -138,7 +120,6 @@
- ^nova/test.py$ - ^nova/test.py$
- ^releasenotes/.*$ - ^releasenotes/.*$
- ^setup.cfg$ - ^setup.cfg$
- ^tests-py3.txt$
- ^tools/.*$ - ^tools/.*$
- ^tox.ini$ - ^tox.ini$
# TODO(mriedem): Make this voting and gating once bug 1771700 is fixed # TODO(mriedem): Make this voting and gating once bug 1771700 is fixed
@ -223,6 +204,7 @@
bridge_mappings: public:br-ex bridge_mappings: public:br-ex
resource_provider_bandwidths: br-ex:1000000:1000000 resource_provider_bandwidths: br-ex:1000000:1000000
devstack_localrc: devstack_localrc:
USE_PYTHON3: True
# Added in Pike. # Added in Pike.
NOVA_USE_SERVICE_TOKEN: True NOVA_USE_SERVICE_TOKEN: True
# Enable TLS between the noVNC proxy & compute nodes; this requires # Enable TLS between the noVNC proxy & compute nodes; this requires
@ -243,6 +225,7 @@
group-vars: group-vars:
subnode: subnode:
devstack_localrc: devstack_localrc:
USE_PYTHON3: True
NOVA_USE_SERVICE_TOKEN: True NOVA_USE_SERVICE_TOKEN: True
NOVA_CONSOLE_PROXY_COMPUTE_TLS: True NOVA_CONSOLE_PROXY_COMPUTE_TLS: True
devstack_services: devstack_services:
@ -262,6 +245,7 @@
tox_envlist: all tox_envlist: all
tempest_test_regex: api.*compute tempest_test_regex: api.*compute
devstack_localrc: devstack_localrc:
USE_PYTHON3: True
TEMPEST_COMPUTE_TYPE: compute_legacy TEMPEST_COMPUTE_TYPE: compute_legacy
- job: - job:
@ -321,6 +305,7 @@
# Disable other non-essential services that we don't need for this job. # Disable other non-essential services that we don't need for this job.
c-bak: false c-bak: false
devstack_localrc: devstack_localrc:
USE_PYTHON3: True
# Setup two non-cell0 cells (cell1 and cell2). # Setup two non-cell0 cells (cell1 and cell2).
NOVA_NUM_CELLS: 2 NOVA_NUM_CELLS: 2
# Resize to the same host is supported for now since we only have # Resize to the same host is supported for now since we only have
@ -334,10 +319,12 @@
group-vars: group-vars:
peers: peers:
devstack_localrc: devstack_localrc:
USE_PYTHON3: True
NOVA_ALLOW_MOVE_TO_SAME_HOST: true NOVA_ALLOW_MOVE_TO_SAME_HOST: true
LIVE_MIGRATION_AVAILABLE: false LIVE_MIGRATION_AVAILABLE: false
subnode: subnode:
devstack_localrc: devstack_localrc:
USE_PYTHON3: True
# The subnode compute will get registered with cell2. # The subnode compute will get registered with cell2.
NOVA_CPU_CELL: 2 NOVA_CPU_CELL: 2
devstack_services: devstack_services:
@ -367,8 +354,7 @@
- integrated-gate-compute - integrated-gate-compute
- openstack-cover-jobs - openstack-cover-jobs
- openstack-lower-constraints-jobs - openstack-lower-constraints-jobs
- openstack-python-jobs - openstack-python3-ussuri-jobs
- openstack-python3-train-jobs
- periodic-stable-jobs - periodic-stable-jobs
- publish-openstack-docs-pti - publish-openstack-docs-pti
- release-notes-jobs-python3 - release-notes-jobs-python3
@ -396,7 +382,6 @@
- nova-lvm - nova-lvm
- nova-multi-cell - nova-multi-cell
- nova-next - nova-next
- nova-tox-functional
- nova-tox-functional-py36 - nova-tox-functional-py36
- tempest-integrated-compute: - tempest-integrated-compute:
irrelevant-files: *dsvm-irrelevant-files irrelevant-files: *dsvm-irrelevant-files
@ -408,7 +393,6 @@
jobs: jobs:
- nova-grenade-multinode - nova-grenade-multinode
- nova-live-migration - nova-live-migration
- nova-tox-functional
- nova-tox-functional-py36 - nova-tox-functional-py36
- nova-multi-cell - nova-multi-cell
- nova-next - nova-next

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Python 2.7 support has been dropped. The minimum version of Python now
supported by nova is Python 3.6.

View File

@ -23,7 +23,6 @@ netaddr>=0.7.18 # BSD
netifaces>=0.10.4 # MIT netifaces>=0.10.4 # MIT
paramiko>=2.0.0 # LGPLv2.1+ paramiko>=2.0.0 # LGPLv2.1+
Babel!=2.4.0,>=2.3.4 # BSD Babel!=2.4.0,>=2.3.4 # BSD
enum34>=1.0.4;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD
iso8601>=0.1.11 # MIT iso8601>=0.1.11 # MIT
jsonschema>=2.6.0 # MIT jsonschema>=2.6.0 # MIT
python-cinderclient!=4.0.0,>=3.3.0 # Apache-2.0 python-cinderclient!=4.0.0,>=3.3.0 # Apache-2.0

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack author = OpenStack
author-email = openstack-discuss@lists.openstack.org author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/nova/latest/ home-page = https://docs.openstack.org/nova/latest/
python-requires = >=3.6
classifier = classifier =
Environment :: OpenStack Environment :: OpenStack
Intended Audience :: Information Technology Intended Audience :: Information Technology
@ -13,11 +14,11 @@ classifier =
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux Operating System :: POSIX :: Linux
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.7
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
[extras] [extras]
osprofiler = osprofiler =

View File

@ -3,7 +3,6 @@
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking>=1.1.0,<1.2.0 # Apache-2.0 hacking>=1.1.0,<1.2.0 # Apache-2.0
contextlib2>=0.5.5;python_version<'3.0' # PSF License
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT ddt>=1.0.1 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD

25
tox.ini
View File

@ -1,6 +1,6 @@
[tox] [tox]
minversion = 3.1.1 minversion = 3.1.1
envlist = py27,py37,functional,pep8 envlist = py37,functional,pep8
# Automatic envs (pyXX) will only use the python version appropriate to that # Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set # env and ignore basepython inherited from [testenv] if we set
# ignore_basepython_conflict. # ignore_basepython_conflict.
@ -36,10 +36,6 @@ passenv =
commands = commands =
stestr run {posargs} stestr run {posargs}
env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler' env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler'
[testenv:py27]
commands =
{[testenv]commands}
stestr slowest stestr slowest
[testenv:pep8] [testenv:pep8]
@ -61,13 +57,8 @@ commands =
bash tools/flake8wrap.sh -HEAD bash tools/flake8wrap.sh -HEAD
[testenv:functional] [testenv:functional]
# TODO(melwitt): This can be removed when functional tests are gating with description =
# python 3.x Run functional tests using python3.
# NOTE(cdent): For a while, we shared functional virtualenvs with the unit
# tests, to save some time. However, this conflicts with tox siblings in zuul,
# and we need siblings to make testing against master of other projects work.
basepython = python2.7
setenv = {[testenv]setenv}
# As nova functional tests import the PlacementFixture from the placement # As nova functional tests import the PlacementFixture from the placement
# repository these tests are, by default, set up to run with latest master from # repository these tests are, by default, set up to run with latest master from
# the placement repo. In the gate, Zuul will clone the latest master from # the placement repo. In the gate, Zuul will clone the latest master from
@ -92,18 +83,16 @@ commands =
stestr --test-path=./nova/tests/functional run {posargs} stestr --test-path=./nova/tests/functional run {posargs}
stestr slowest stestr slowest
# TODO(gcb) Merge this into [testenv:functional] when functional tests are gating
# with python 3
[testenv:functional-py36] [testenv:functional-py36]
basepython = python3.6 description =
setenv = {[testenv]setenv} Run functional tests using python3.6.
deps = {[testenv:functional]deps} deps = {[testenv:functional]deps}
commands = commands =
{[testenv:functional]commands} {[testenv:functional]commands}
[testenv:functional-py37] [testenv:functional-py37]
basepython = python3.7 description =
setenv = {[testenv]setenv} Run functional tests using python3.7.
deps = {[testenv:functional]deps} deps = {[testenv:functional]deps}
commands = commands =
{[testenv:functional]commands} {[testenv:functional]commands}