Browse Source

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
tags/6.0.0
Ghanshyam Mann 5 months ago
parent
commit
1aac4646f8
12 changed files with 8 additions and 505 deletions
  1. +0
    -59
      .zuul.yaml
  2. +0
    -80
      playbooks/legacy/vitrage-dsvm-api-py27/post.yaml
  3. +0
    -68
      playbooks/legacy/vitrage-dsvm-api-py27/run.yaml
  4. +0
    -80
      playbooks/legacy/vitrage-dsvm-datasources-py27/post.yaml
  5. +0
    -68
      playbooks/legacy/vitrage-dsvm-datasources-py27/run.yaml
  6. +0
    -80
      playbooks/legacy/vitrage-dsvm-mock-py27/post.yaml
  7. +0
    -66
      playbooks/legacy/vitrage-dsvm-mock-py27/run.yaml
  8. +1
    -0
      playbooks/legacy/vitrage-grenade/run.yaml
  9. +6
    -0
      releasenotes/notes/drop-py-2-7-6add89c8aeb58399.yaml
  10. +0
    -1
      requirements.txt
  11. +0
    -2
      setup.cfg
  12. +1
    -1
      tox.ini

+ 0
- 59
.zuul.yaml View File

@@ -2,15 +2,11 @@
templates:
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:
jobs:
- vitrage-dsvm-api-py27
- vitrage-dsvm-datasources-py27
- vitrage-dsvm-mock-py27
- vitrage-dsvm-api-py3
- vitrage-dsvm-datasources-py3
- vitrage-dsvm-mock-py3
@@ -18,30 +14,10 @@
gate:
queue: vitrage
jobs:
- vitrage-dsvm-api-py27
- vitrage-dsvm-datasources-py27
- vitrage-dsvm-api-py3
- vitrage-dsvm-datasources-py3
- 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:
name: vitrage-dsvm-api-py3
parent: legacy-dsvm-base
@@ -60,24 +36,6 @@
- ^doc/.*$
- ^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:
name: vitrage-dsvm-datasources-py3
parent: legacy-dsvm-base
@@ -96,23 +54,6 @@
- ^doc/.*$
- ^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:
name: vitrage-dsvm-mock-py3
parent: legacy-dsvm-base


+ 0
- 80
playbooks/legacy/vitrage-dsvm-api-py27/post.yaml 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

+ 0
- 68
playbooks/legacy/vitrage-dsvm-api-py27/run.yaml 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 }}'

+ 0
- 80
playbooks/legacy/vitrage-dsvm-datasources-py27/post.yaml 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

+ 0
- 68
playbooks/legacy/vitrage-dsvm-datasources-py27/run.yaml 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 }}'

+ 0
- 80
playbooks/legacy/vitrage-dsvm-mock-py27/post.yaml 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

+ 0
- 66
playbooks/legacy/vitrage-dsvm-mock-py27/run.yaml 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 }}'

+ 1
- 0
playbooks/legacy/vitrage-grenade/run.yaml View File

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


+ 6
- 0
releasenotes/notes/drop-py-2-7-6add89c8aeb58399.yaml 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.

+ 0
- 1
requirements.txt View File

@@ -52,7 +52,6 @@ eventlet!=0.20.1,>=0.20.0 # MIT
six>=1.11.0 # MIT
debtcollector>=1.19.0 # 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
tenacity>=4.9.0
tooz>=1.58.0 # Apache-2.0


+ 0
- 2
setup.cfg View File

@@ -13,8 +13,6 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7


+ 1
- 1
tox.ini View File

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

[testenv]


Loading…
Cancel
Save