Drop python 2.7 support and testing

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

Vitrage is ready with python 3 and ok to drop the
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 Communtiy-wide goal - https://review.opendev.org/#/c/691178/

Change-Id: Ia9339cc6397b680320909f98e4eb8aeb817ab5af
This commit is contained in:
Ghanshyam Mann 2019-10-30 04:58:16 +00:00
parent 8c027ee36e
commit 1aac4646f8
12 changed files with 8 additions and 505 deletions

View File

@ -2,15 +2,11 @@
templates: templates:
- check-requirements - check-requirements
- 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:
- vitrage-dsvm-api-py27
- vitrage-dsvm-datasources-py27
- vitrage-dsvm-mock-py27
- vitrage-dsvm-api-py3 - vitrage-dsvm-api-py3
- vitrage-dsvm-datasources-py3 - vitrage-dsvm-datasources-py3
- vitrage-dsvm-mock-py3 - vitrage-dsvm-mock-py3
@ -18,30 +14,10 @@
gate: gate:
queue: vitrage queue: vitrage
jobs: jobs:
- vitrage-dsvm-api-py27
- vitrage-dsvm-datasources-py27
- vitrage-dsvm-api-py3 - vitrage-dsvm-api-py3
- vitrage-dsvm-datasources-py3 - vitrage-dsvm-datasources-py3
- grenade-vitrage - grenade-vitrage
- job:
name: vitrage-dsvm-api-py27
parent: legacy-dsvm-base
run: playbooks/legacy/vitrage-dsvm-api-py27/run.yaml
post-run: playbooks/legacy/vitrage-dsvm-api-py27/post.yaml
timeout: 7800
required-projects:
- openstack/devstack-gate
- openstack/aodh
- openstack/mistral
- openstack/python-vitrageclient
- openstack/vitrage
- openstack/vitrage-tempest-plugin
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
- job: - job:
name: vitrage-dsvm-api-py3 name: vitrage-dsvm-api-py3
parent: legacy-dsvm-base parent: legacy-dsvm-base
@ -60,24 +36,6 @@
- ^doc/.*$ - ^doc/.*$
- ^releasenotes/.*$ - ^releasenotes/.*$
- job:
name: vitrage-dsvm-datasources-py27
parent: legacy-dsvm-base
run: playbooks/legacy/vitrage-dsvm-datasources-py27/run.yaml
post-run: playbooks/legacy/vitrage-dsvm-datasources-py27/post.yaml
timeout: 7800
required-projects:
- openstack/devstack-gate
- openstack/aodh
- openstack/mistral
- openstack/python-vitrageclient
- openstack/vitrage
- openstack/vitrage-tempest-plugin
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
- job: - job:
name: vitrage-dsvm-datasources-py3 name: vitrage-dsvm-datasources-py3
parent: legacy-dsvm-base parent: legacy-dsvm-base
@ -96,23 +54,6 @@
- ^doc/.*$ - ^doc/.*$
- ^releasenotes/.*$ - ^releasenotes/.*$
- job:
name: vitrage-dsvm-mock-py27
parent: legacy-dsvm-base
voting: false
run: playbooks/legacy/vitrage-dsvm-mock-py27/run.yaml
post-run: playbooks/legacy/vitrage-dsvm-mock-py27/post.yaml
timeout: 7800
required-projects:
- openstack/devstack-gate
- openstack/python-vitrageclient
- openstack/vitrage
- openstack/vitrage-tempest-plugin
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
- job: - job:
name: vitrage-dsvm-mock-py3 name: vitrage-dsvm-mock-py3
parent: legacy-dsvm-base parent: legacy-dsvm-base

View File

@ -1,80 +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=**/*nose_results.html
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=**/*testr_results.html.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=/.testrepository/tmp*
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=**/*testrepository.subunit.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}/tox'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/.tox/*/log/*
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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,68 +0,0 @@
- hosts: all
name: Autoconverted job legacy-vitrage-dsvm-api-py27 from old job gate-vitrage-dsvm-api-py27-ubuntu-xenial
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
export PYTHONUNBUFFERED=true
export PROJECTS="openstack/python-vitrageclient $PROJECTS"
export PROJECTS="openstack/aodh $PROJECTS"
export PROJECTS="openstack/mistral $PROJECTS"
export PROJECTS="openstack/vitrage $PROJECTS"
export PROJECTS="openstack/vitrage-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=False
function pre_test_hook {
source $BASE/new/vitrage-tempest-plugin/devstack/pre_test_hook.sh
}
export -f pre_test_hook
function gate_hook {
source $BASE/new/vitrage/devstack/gate_hook.sh
}
export -f gate_hook
function post_test_hook {
if [[ "$TEMPEST_VERSION" != "master" ]]; then
# use vitrage-tempest-plugin $TEMPEST_VERSION
# which is defined in the devstackgaterc file
cd $BASE/new/vitrage-tempest-plugin/
git_checkout_tag vitrage-tempest-plugin $TEMPEST_VERSION
fi
source $BASE/new/vitrage-tempest-plugin/devstack/post_test_hook.sh 'api'
}
export -f post_test_hook
export DEVSTACK_GATE_SETTINGS=/opt/stack/new/vitrage/devstack/devstackgaterc
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,80 +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=**/*nose_results.html
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=**/*testr_results.html.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=/.testrepository/tmp*
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=**/*testrepository.subunit.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}/tox'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/.tox/*/log/*
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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,68 +0,0 @@
- hosts: all
name: Autoconverted job legacy-vitrage-dsvm-datasources-py27 from old job gate-vitrage-dsvm-datasources-py27-ubuntu-xenial
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
export PYTHONUNBUFFERED=true
export PROJECTS="openstack/python-vitrageclient $PROJECTS"
export PROJECTS="openstack/aodh $PROJECTS"
export PROJECTS="openstack/mistral $PROJECTS"
export PROJECTS="openstack/vitrage $PROJECTS"
export PROJECTS="openstack/vitrage-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=False
function pre_test_hook {
source $BASE/new/vitrage-tempest-plugin/devstack/pre_test_hook.sh
}
export -f pre_test_hook
function gate_hook {
source $BASE/new/vitrage/devstack/gate_hook.sh
}
export -f gate_hook
function post_test_hook {
if [[ "$TEMPEST_VERSION" != "master" ]]; then
# use vitrage-tempest-plugin $TEMPEST_VERSION
# which is defined in the devstackgaterc file
cd $BASE/new/vitrage-tempest-plugin/
git_checkout_tag vitrage-tempest-plugin $TEMPEST_VERSION
fi
source $BASE/new/vitrage-tempest-plugin/devstack/post_test_hook.sh 'datasources'
}
export -f post_test_hook
export DEVSTACK_GATE_SETTINGS=/opt/stack/new/vitrage/devstack/devstackgaterc
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,80 +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=**/*nose_results.html
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=**/*testr_results.html.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=/.testrepository/tmp*
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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=**/*testrepository.subunit.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}/tox'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/.tox/*/log/*
- --include=*/
- --exclude=*
- --prune-empty-dirs
- 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,66 +0,0 @@
- hosts: all
name: Autoconverted job legacy-vitrage-dsvm-mock-py27 from old job gate-vitrage-dsvm-mock-py27-ubuntu-xenial
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
export PYTHONUNBUFFERED=true
export PROJECTS="openstack/python-vitrageclient $PROJECTS"
export PROJECTS="openstack/vitrage $PROJECTS"
export PROJECTS="openstack/vitrage-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=False
function pre_test_hook {
source $BASE/new/vitrage-tempest-plugin/devstack/pre_test_hook.sh
}
export -f pre_test_hook
function gate_hook {
source $BASE/new/vitrage/devstack/gate_hook_mock.sh
}
export -f gate_hook
function post_test_hook {
if [[ "$TEMPEST_VERSION" != "master" ]]; then
# use vitrage-tempest-plugin $TEMPEST_VERSION
# which is defined in the devstackgaterc file
cd $BASE/new/vitrage-tempest-plugin/
git_checkout_tag vitrage-tempest-plugin $TEMPEST_VERSION
fi
source $BASE/new/vitrage-tempest-plugin/devstack/post_test_hook.sh 'mock'
}
export -f post_test_hook
export DEVSTACK_GATE_SETTINGS=/opt/stack/new/vitrage/devstack/devstackgaterc
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

@ -31,6 +31,7 @@
[[local|localrc]] [[local|localrc]]
enable_plugin vitrage https://opendev.org/openstack/vitrage enable_plugin vitrage https://opendev.org/openstack/vitrage
# TEMPEST_PLUGINS+=' ../' # TEMPEST_PLUGINS+=' ../'
USE_PYTHON3=True
EOF EOF
executable: /bin/bash executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace' chdir: '{{ ansible_user_dir }}/workspace'

View File

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

View File

@ -52,7 +52,6 @@ eventlet!=0.20.1,>=0.20.0 # MIT
six>=1.11.0 # MIT six>=1.11.0 # MIT
debtcollector>=1.19.0 # Apache-2.0 debtcollector>=1.19.0 # Apache-2.0
cotyledon>=1.6.8 # Apache-2.0 cotyledon>=1.6.8 # Apache-2.0
futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
pytz>=2013.6 # MIT pytz>=2013.6 # MIT
tenacity>=4.9.0 tenacity>=4.9.0
tooz>=1.58.0 # Apache-2.0 tooz>=1.58.0 # Apache-2.0

View File

@ -13,8 +13,6 @@ 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

View File

@ -1,6 +1,6 @@
[tox] [tox]
minversion = 2.3.1 minversion = 2.3.1
envlist = py27,py37,pep8 envlist = py37,pep8
skipsdist = True skipsdist = True
[testenv] [testenv]