[ussuri][goal] Drop python 2.7 support and testing

OpenStack is dropping the py2.7 support in ussuri cycle.

Blazar is ready with python 3 and ok to drop python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Community-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Co-Authored-By: Ghanshyam Mann <gmann@ghanshyammann.com>

Change-Id: I69bd82f8a1156f2f2eb636ea96c439c0645cc102
This commit is contained in:
Tetsuro Nakamura 2019-10-28 01:53:17 +00:00 committed by Pierre Riteau
parent 9cef00c2ad
commit 352893e78c
8 changed files with 21 additions and 123 deletions

View File

@ -20,32 +20,10 @@
- openstack/python-blazarclient - openstack/python-blazarclient
- openstack/blazar-tempest-plugin - openstack/blazar-tempest-plugin
- job:
name: blazar-devstack-dsvm-py35
parent: legacy-dsvm-base
irrelevant-files:
- ^.*\.rst$
- ^blazar/tests/.*$
- ^doc/.*$
- ^releasenotes/.*$
- ^test-requirements.txt$
- ^tools/.*$
- ^tox.ini$
run: playbooks/legacy/blazar-devstack-dsvm-py35/run.yaml
post-run: playbooks/legacy/blazar-devstack-dsvm-py35/post.yaml
timeout: 4200
required-projects:
- openstack/devstack
- openstack/devstack-gate
- openstack/blazar
- openstack/blazar-nova
- openstack/python-blazarclient
- openstack/blazar-tempest-plugin
- job: - job:
name: blazar-devstack-dsvm-ipv6-only name: blazar-devstack-dsvm-ipv6-only
parent: blazar-devstack-dsvm-py35 parent: blazar-devstack-dsvm
run: playbooks/legacy/blazar-devstack-dsvm-py35/run-ipv6.yaml run: playbooks/legacy/blazar-devstack-dsvm/run-ipv6.yaml
required-projects: required-projects:
- openstack/tempest - openstack/tempest
@ -54,14 +32,12 @@
- check-requirements - check-requirements
- openstack-cover-jobs - openstack-cover-jobs
- openstack-lower-constraints-jobs - openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs - openstack-python3-ussuri-jobs
- publish-openstack-docs-pti - publish-openstack-docs-pti
- release-notes-jobs-python3 - release-notes-jobs-python3
check: check:
jobs: jobs:
- blazar-devstack-dsvm - blazar-devstack-dsvm
- blazar-devstack-dsvm-py35
- blazar-devstack-dsvm-ipv6-only - blazar-devstack-dsvm-ipv6-only
- openstack-tox-pylint: - openstack-tox-pylint:
voting: false voting: false
@ -69,5 +45,4 @@
queue: blazar queue: blazar
jobs: jobs:
- blazar-devstack-dsvm - blazar-devstack-dsvm
- blazar-devstack-dsvm-py35
- blazar-devstack-dsvm-ipv6-only - blazar-devstack-dsvm-ipv6-only

View File

@ -1,15 +0,0 @@
- hosts: primary
tasks:
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -1,65 +0,0 @@
- hosts: all
name: legacy-blazar-devstack-dsvm-py35
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
cat > clonemap.yaml << EOF
clonemap:
- name: openstack/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
https://opendev.org \
openstack/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin blazar https://opendev.org/openstack/blazar
# Swift is not ready for python3 yet
disable_service s-account
disable_service s-container
disable_service s-object
disable_service s-proxy
# Without Swift, c-bak cannot run (in the Gate at least)
disable_service c-bak
# Enable Tempest plugin
TEMPEST_PLUGINS='/opt/stack/new/blazar-tempest-plugin'
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export DEVSTACK_GATE_USE_PYTHON3=True
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export ENABLED_SERVICES=blazar,blazar-a,blazar-m,tempest
export PROJECTS="openstack/blazar $PROJECTS"
export PROJECTS="openstack/blazar-nova $PROJECTS"
export PROJECTS="openstack/python-blazarclient $PROJECTS"
export PROJECTS="openstack/blazar-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_TEMPEST_REGEX="blazar_tempest_plugin"
export TEMPEST_CONCURRENCY=1
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -1,5 +1,5 @@
- hosts: all - hosts: all
name: Autoconverted job legacy-blazar-devstack-dsvm from old job gate-blazar-devstack-dsvm name: legacy-blazar-devstack-dsvm-py35
tasks: tasks:
- name: Ensure legacy workspace directory - name: Ensure legacy workspace directory
@ -30,6 +30,13 @@
cat << 'EOF' >>"/tmp/dg-local.conf" cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]] [[local|localrc]]
enable_plugin blazar https://opendev.org/openstack/blazar enable_plugin blazar https://opendev.org/openstack/blazar
# Swift is not ready for python3 yet
disable_service s-account
disable_service s-container
disable_service s-object
disable_service s-proxy
# Without Swift, c-bak cannot run (in the Gate at least)
disable_service c-bak
# Enable Tempest plugin # Enable Tempest plugin
TEMPEST_PLUGINS='/opt/stack/new/blazar-tempest-plugin' TEMPEST_PLUGINS='/opt/stack/new/blazar-tempest-plugin'
EOF EOF
@ -41,6 +48,7 @@
cmd: | cmd: |
set -e set -e
set -x set -x
export DEVSTACK_GATE_USE_PYTHON3=True
export PYTHONUNBUFFERED=true export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1 export DEVSTACK_GATE_TEMPEST=1
export ENABLED_SERVICES=blazar,blazar-a,blazar-m,tempest export ENABLED_SERVICES=blazar,blazar-a,blazar-m,tempest

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. The last release of Blazar supporting
Python 2.7 is OpenStack Train. The minimum version of Python now supported
by Blazar is Python 3.6.

View File

@ -5,8 +5,6 @@ description-file = README.rst
license = Apache Software License license = Apache Software License
classifiers = classifiers =
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

17
tox.ini
View File

@ -1,9 +1,11 @@
[tox] [tox]
envlist = py27,py36,py37,pep8 envlist = py36,py37,pep8
minversion = 2.0 minversion = 3.1.1
skipsdist = True skipsdist = True
ignore_basepython_conflict = True
[testenv] [testenv]
basepython = python3
usedevelop = True usedevelop = True
whitelist_externals = rm whitelist_externals = rm
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
@ -18,7 +20,6 @@ commands =
sitepackages = False sitepackages = False
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
PYTHON=coverage run --source blazar --parallel-mode PYTHON=coverage run --source blazar --parallel-mode
@ -31,15 +32,12 @@ commands =
coverage report coverage report
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:docs] [testenv:docs]
basepython = python3
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
@ -50,7 +48,6 @@ commands =
python setup.py build_sphinx python setup.py build_sphinx
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
whitelist_externals = make whitelist_externals = make
commands = commands =
@ -58,7 +55,6 @@ commands =
make -C doc/build/pdf make -C doc/build/pdf
[testenv:genconfig] [testenv:genconfig]
basepython = python3
commands = oslo-config-generator --config-file=etc/blazar/blazar-config-generator.conf commands = oslo-config-generator --config-file=etc/blazar/blazar-config-generator.conf
[flake8] [flake8]
@ -78,17 +74,14 @@ max-complexity=17
local-check-factory = blazar.hacking.checks.factory local-check-factory = blazar.hacking.checks.factory
[testenv:pylint] [testenv:pylint]
basepython = python3
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt
pylint==1.9.1 pylint==1.9.1
commands = pylint blazar commands = pylint blazar
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:api-ref] [testenv:api-ref]
basepython = python3
# This environment is called from CI scripts to test and publish # This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org. # the API Ref to docs.openstack.org.
commands = commands =
@ -100,7 +93,6 @@ commands =
oslopolicy-sample-generator --config-file etc/blazar/blazar-policy-generator.conf oslopolicy-sample-generator --config-file etc/blazar/blazar-policy-generator.conf
[testenv:lower-constraints] [testenv:lower-constraints]
basepython = python3
deps = deps =
-c{toxinidir}/lower-constraints.txt -c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
@ -109,7 +101,6 @@ deps =
# This environment can be used to quickly validate that all needed system # This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed # packages required to successfully execute test targets are installed
[testenv:bindep] [testenv:bindep]
basepython = python3
# Do not install any requirements. We want this to be fast and work even if # 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 # system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed # dependencies are missing! This also means that bindep must be installed