From 5e0c6dfda2e25f1d8555113bb1afae1c4dd7c6a4 Mon Sep 17 00:00:00 2001 From: Gustavo Pereira Date: Thu, 13 Jul 2023 17:15:51 -0300 Subject: [PATCH] Clean up outdated configs in tox.ini and .zuul.yaml Tests still have python2.7 configs remaining and some tests are named -debian, implying the old ones are for centos and can be removed. This commit removes the python2.7 and centos configs from tox and zuul. Test Plan: 1. PASS - Ran all tests in tox and verified if every test finished with the desired output. 2. PASS - Ran tests in zuul environment and checked if it was successful. Story: 2010531 Task: 48384 Change-Id: Ibac431754cda5150847a4f47768000d8a222434d Signed-off-by: Gustavo Pereira --- .zuul.yaml | 42 +++---------------- distributedcloud/requirements.txt | 1 - distributedcloud/tox.ini | 68 ++----------------------------- 3 files changed, 9 insertions(+), 102 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 20f388c8e..dc2ed04a7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -11,16 +11,12 @@ - stx-distcloud-tox-pep8 - stx-distcloud-tox-py39 - stx-distcloud-tox-pylint - - stx-distcloud-tox-pep8-debian - - stx-distcloud-tox-pylint-debian gate: jobs: - openstack-tox-linters - stx-distcloud-tox-pep8 - stx-distcloud-tox-py39 - stx-distcloud-tox-pylint - - stx-distcloud-tox-pep8-debian - - stx-distcloud-tox-pylint-debian post: jobs: - stx-distcloud-upload-git-mirror @@ -29,7 +25,7 @@ name: stx-distcloud-tox-py39 parent: tox-py39 description: Run py39 for distcloud - nodeset: ubuntu-focal + nodeset: debian-bullseye pre-run: - tools/gate/playbooks/install-postgresql.yaml required-projects: @@ -47,21 +43,7 @@ name: stx-distcloud-tox-pylint parent: tox description: Run pylint for distcloud - nodeset: ubuntu-bionic - required-projects: - - starlingx/fault - - starlingx/nfv - - starlingx/update - - starlingx/config - vars: - tox_envlist: pylint - tox_extra_args: -c distributedcloud/tox.ini - -- job: - name: stx-distcloud-tox-pylint-debian - parent: tox - description: Run pylint for distcloud - nodeset: ubuntu-focal + nodeset: debian-bullseye required-projects: - starlingx/fault - starlingx/nfv @@ -69,28 +51,14 @@ - starlingx/config vars: python_version: 3.9 - tox_envlist: pylint_Debian + tox_envlist: pylint tox_extra_args: -c distributedcloud/tox.ini - job: name: stx-distcloud-tox-pep8 parent: tox description: Run pep8 for distcloud - nodeset: ubuntu-focal - required-projects: - - starlingx/fault - - starlingx/nfv - - starlingx/update - - starlingx/config - vars: - tox_envlist: pep8 - tox_extra_args: -c distributedcloud/tox.ini - -- job: - name: stx-distcloud-tox-pep8-debian - parent: tox - nodeset: ubuntu-focal - description: Run pep8 for distcloud + nodeset: debian-bullseye required-projects: - starlingx/fault - starlingx/nfv @@ -98,7 +66,7 @@ - starlingx/config vars: python_version: 3.9 - tox_envlist: pep8_Debian + tox_envlist: pep8 tox_extra_args: -c distributedcloud/tox.ini - job: diff --git a/distributedcloud/requirements.txt b/distributedcloud/requirements.txt index 796b55bad..b68dcfa84 100644 --- a/distributedcloud/requirements.txt +++ b/distributedcloud/requirements.txt @@ -48,7 +48,6 @@ python-novaclient>=7.1.0 # Apache-2.0 python-keystoneclient>=3.8.0 # Apache-2.0 pycrypto>=2.6 # Public Domain requests_toolbelt -retrying keyring kubernetes # Apache-2.0 psutil diff --git a/distributedcloud/tox.ini b/distributedcloud/tox.ini index a68c090b8..3378b9588 100644 --- a/distributedcloud/tox.ini +++ b/distributedcloud/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pep8,py27,py39,pylint,pep8_Debian,pylint_Debian +envlist = py39,pep8,pylint minversion = 2.3 skipsdist = True @@ -19,22 +19,12 @@ cgcs_patch_src_dir = ../../update/sw-patch/cgcs-patch stx_root_dir = ../../root [testenv] +basepython = python3.9 sitepackages = False install_command = pip install -v -v -v \ - -c https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt \ + -c https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt \ {opts} {packages} -# If a target such as pylint requires executing the code, install these modules -# using the -e option (without using sdist. ie: developer mode) -# Note: usedevelop=True and skipsdist=True cannot both be used -install_runtime = - pip install -e {[dc]nfv_client_src_dir} \ - -e {[dc]tsconfig_src_dir} \ - -e {[dc]fmclient_src_dir} \ - -e {[dc]fm_api_src_dir} \ - -e {[dc]cgtsclient_src_dir} \ - -e {[dc]cgcs_patch_src_dir} - setenv = VIRTUAL_ENV={envdir} OS_STDOUT_CAPTURE=1 @@ -52,25 +42,7 @@ allowlist_externals = find reno -[testenv:py27] -basepython = python2.7 -commands = - {[testenv]install_runtime} - find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete - python setup.py testr --slowest --testr-args='{posargs}' - -[testenv:py36] -basepython = python3.6 -commands = - {[testenv]install_runtime} - find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete - python setup.py testr --slowest --testr-args='{posargs}' - [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} deps = -r{toxinidir}/test-requirements-debian.txt -r{toxinidir}/requirements.txt keyring @@ -83,41 +55,16 @@ commands = find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete python setup.py testr --slowest --testr-args='{posargs}' -[testenv:debug-py27] -basepython = python2.7 -commands = oslo_debug_helper {posargs} [testenv:pep8] -basepython = python3 -commands = flake8 - -[testenv:pep8_Debian] -basepython = python3.9 -deps = -r{toxinidir}/test-requirements-debian.txt -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 = flake8 [testenv:venv] basepython = python3 commands = {posargs} -[testenv:cover] -basepython = python2.7 -commands = - {[testenv]install_runtime} - coverage erase - rm -Rf cover - rm -f coverage.xml - find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete - python setup.py testr --coverage --testr-args='{posargs}' - coverage html -d cover - coverage xml --rcfile=.coveragerc_xml - coverage report -[testenv:cover_Debian] -basepython = python3.9 +[testenv:cover] 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} @@ -205,13 +152,6 @@ commands = import_exceptions = dcmanager.common.i18n,dcorch.common.i18n [testenv:pylint] -basepython = python3 -commands = - {[testenv]install_runtime} - pylint {posargs} dccommon dcmanager dcorch dcdbsync --rcfile=./pylint.rc - -[testenv:pylint_Debian] -basepython = python3.9 deps = -r{toxinidir}/test-requirements-debian.txt -r{toxinidir}/requirements.txt -e{[dc]nfv_client_src_dir}