Remove python2 jobs from zuul for this repo

- Remove the python2 jobs from zuul for this repo
 - Remove python2 entries from test-requirements and tox
 - Removed redundant basepython and other tox.ini entries
 - Updated the upper constraints for the newer python
 - Fix the test-requirements so 'cover' can run
 - Update .gitignore to show a clean repo after running tox
 - Added prettytable to the requirements files
 - Updated the versions of python in setup.cfg

These changes should only affect tox and zuul.
However, since the requirements.txt files were updated, an
ISO was also booted to verify no runtime impact.

Test Plan:
  PASS: Build packages and ISO
  PASS: Boot AIO-SX, bootstrap and unlocked.
  PASS: tox (able to run tox for all 3 tox.ini files)
  PASS: run kube-memory and kube-cpusets on controller

Story: 2010642
Task: 47882
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I4359f3659e75ddfda4208524a6b74360dfe5ee0c
This commit is contained in:
Al Bailey 2023-04-25 20:05:26 +00:00
parent d5aa0bf737
commit 9c48ac6611
10 changed files with 20 additions and 84 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
.tox
.coverage
.stestr

View File

@ -5,22 +5,18 @@
check:
jobs:
- openstack-tox-linters
- kube-cpusets-tox-py27
- kube-cpusets-tox-py39
- kube-cpusets-tox-flake8
- kube-cpusets-tox-pylint
- kube-memory-tox-py27
- kube-memory-tox-py39
- kube-memory-tox-flake8
- kube-memory-tox-pylint
gate:
jobs:
- openstack-tox-linters
- kube-cpusets-tox-py27
- kube-cpusets-tox-py39
- kube-cpusets-tox-flake8
- kube-cpusets-tox-pylint
- kube-memory-tox-py27
- kube-memory-tox-py39
- kube-memory-tox-flake8
- kube-memory-tox-pylint
@ -84,20 +80,6 @@
tox_envlist: py39
tox_extra_args: -c kube-cpusets/kube-cpusets/tox.ini
- job:
name: kube-cpusets-tox-py27
parent: tox
description: |
Run py27 test for kube-cpusets
nodeset: ubuntu-bionic
required-projects:
- starlingx/config
files:
- kube-cpusets/kube-cpusets/*
vars:
tox_envlist: py27
tox_extra_args: -c kube-cpusets/kube-cpusets/tox.ini
- job:
name: kube-memory-tox-pylint
parent: tox
@ -141,20 +123,6 @@
tox_envlist: py39
tox_extra_args: -c kube-memory/kube-memory/tox.ini
- job:
name: kube-memory-tox-py27
parent: tox
description: |
Run py27 test for kube-memory
nodeset: ubuntu-bionic
required-projects:
- starlingx/config
files:
- kube-memory/kube-memory/*
vars:
tox_envlist: py27
tox_extra_args: -c kube-memory/kube-memory/tox.ini
- secret:
name: stx-monitoring-github-secret
data:

View File

@ -1,3 +1,4 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
prettytable

View File

@ -8,11 +8,9 @@ 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.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.9
[files]
packages =

View File

@ -1,10 +1,10 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
flake8<3.8.0
hacking>=1.1.0,<=2.0.0 # Apache-2.0
pylint<2.1.0;python_version<"3.0" # GPLv2
pylint<2.4.0;python_version>="3.0" # GPLv2coverage!=4.4,>=4.0 # Apache-2.0
flake8<3.8.0
pylint<2.4.0;python_version>="3.0" # GPLv2
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
stestr>=1.0.0 # Apache-2.0
testtools>=2.2.0 # MIT

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
#
[tox]
envlist = flake8,py27,py36,py39,pylint,cover
envlist = flake8,py39,pylint,cover
minversion = 2.3.2
skipsdist = True
stxdir = {toxinidir}/../../..
@ -22,10 +22,11 @@ setenv = VIRTUAL_ENV={envdir}
PIP_DISABLE_PIP_VERSION_CHECK=1
passenv =
XDG_CACHE_HOME
basepython = python3
sitepackages = False
install_command = pip install \
-v -v -v \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
@ -38,20 +39,8 @@ commands =
stestr run {posargs}
stestr slowest
[testenv:py27]
basepython = python2.7
commands = {[testenv:stestr]commands}
[testenv:py36]
basepython = python3.6
commands = {[testenv:stestr]commands}
[testenv:py39]
basepython = python3.9
install_command = pip install \
-v -v -v \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
commands = {[testenv:stestr]commands}
@ -59,7 +48,6 @@ commands = {[testenv:stestr]commands}
exclude = tests
[testenv:bandit]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
bandit
commands = bandit --ini tox.ini -n 5 -r kube_cpusets
@ -73,8 +61,8 @@ exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
# enable: H904 Delay string interpolations at logging calls (off by default).
enable-extensions = H106 H203 H904
max-line-length = 120
[testenv:flake8]
basepython = python3
deps = {[testenv]deps}
flake8-bugbear
usedevelop = False
@ -86,11 +74,6 @@ commands =
basepython = python3.9
deps = {[testenv]deps}
pylint
install_command = pip install \
-v -v -v \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
sitepackages = False
commands = pylint kube_cpusets --rcfile=./pylint.rc
[testenv:cover]

View File

@ -1,4 +1,4 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
prettytable

View File

@ -8,11 +8,9 @@ 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.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.9
[files]
packages =

View File

@ -1,10 +1,10 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
flake8<3.8.0
hacking>=1.1.0,<=2.0.0 # Apache-2.0
pylint<2.1.0;python_version<"3.0" # GPLv2
pylint<2.4.0;python_version>="3.0" # GPLv2coverage!=4.4,>=4.0 # Apache-2.0
flake8<3.8.0
pylint<2.4.0 # GPLv2
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
stestr>=1.0.0 # Apache-2.0
testtools>=2.2.0 # MIT

View File

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
[tox]
envlist = flake8,py27,py36,py39,pylint,cover
envlist = flake8,py39,pylint,cover
minversion = 2.3.2
skipsdist = True
stxdir = {toxinidir}/../../..
@ -21,12 +21,13 @@ setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
PYTHONWARNINGS=default::DeprecationWarning
PIP_DISABLE_PIP_VERSION_CHECK=1
basepython = python3
passenv =
XDG_CACHE_HOME
sitepackages = False
install_command = pip install \
-v -v -v \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
@ -39,26 +40,13 @@ commands =
stestr run {posargs}
stestr slowest
[testenv:py27]
basepython = python2.7
commands = {[testenv:stestr]commands}
[testenv:py36]
basepython = python3.6
commands = {[testenv:stestr]commands}
[testenv:py39]
basepython = python3.9
install_command = pip install \
-v -v -v \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
commands = {[testenv:stestr]commands}
[bandit]
exclude = tests
[testenv:bandit]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
bandit
commands = bandit --ini tox.ini -n 5 -r kube_memory
@ -72,8 +60,8 @@ exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
# enable: H904 Delay string interpolations at logging calls (off by default).
enable-extensions = H106 H203 H904
max-line-length = 120
[testenv:flake8]
basepython = python3
deps = {[testenv]deps}
flake8-bugbear
usedevelop = False
@ -84,8 +72,6 @@ commands =
[testenv:pylint]
deps = {[testenv]deps}
pylint
basepython = python3.6
sitepackages = False
commands = pylint kube_memory --rcfile=./pylint.rc
[testenv:cover]