From f33032c1d05748e95b05bad882e22325bccabe14 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Wed, 21 Dec 2022 15:17:53 +0000 Subject: [PATCH] Fix zuul pylint setup failures The pylint zuul target will now be setup the same as the py39 target. The pip legacy resolver is still needed because not all of the other STX dependencies being installed by tox are aligned properly for python 3.9 Enforce the nodeset for pylint to be the same as py39 Tox 4 was enabled by: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Tox 4 deprecated whitelist_externals. Replace whitelist_externals with allowlist_externals Partial-Bug: #1997255 Partial-Bug: #2000399 Signed-off-by: Al Bailey Change-Id: I7d7ca4531600bd863a045d3daeb0be82fec34377 --- .zuul.yaml | 1 + python-k8sapp-istio/k8sapp_istio/requirements.txt | 2 +- python-k8sapp-istio/k8sapp_istio/tox.ini | 8 +++++++- tox.ini | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 45ac9d6..6b6e3e5 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -49,6 +49,7 @@ parent: tox description: | Run pylint test for k8sapp_istio + nodeset: debian-bullseye required-projects: - starlingx/config - starlingx/fault diff --git a/python-k8sapp-istio/k8sapp_istio/requirements.txt b/python-k8sapp-istio/k8sapp_istio/requirements.txt index 5bc15a1..9e625c7 100644 --- a/python-k8sapp-istio/k8sapp_istio/requirements.txt +++ b/python-k8sapp-istio/k8sapp_istio/requirements.txt @@ -1,2 +1,2 @@ pbr>=0.5 -PyYAML==3.10 +PyYAML>=3.10.0 diff --git a/python-k8sapp-istio/k8sapp_istio/tox.ini b/python-k8sapp-istio/k8sapp_istio/tox.ini index 9b9191e..ef2085a 100644 --- a/python-k8sapp-istio/k8sapp_istio/tox.ini +++ b/python-k8sapp-istio/k8sapp_istio/tox.ini @@ -17,7 +17,7 @@ distshare={toxworkdir}/.tox/distshare sitepackages = False # tox is silly... these need to be separated by a newline.... -whitelist_externals = bash +allowlist_externals = bash find install_command = pip install \ @@ -112,6 +112,12 @@ commands = bandit --ini tox.ini -n 5 -r k8sapp_istio basepython = python3 sitepackages = False +install_command = pip install \ + -v -v -v --use-deprecated legacy-resolver \ + -c{toxinidir}/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 = {[testenv]deps} pylint commands = diff --git a/tox.ini b/tox.ini index 072d3d3..e0214d6 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ setenv = deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -whitelist_externals = +allowlist_externals = bash passenv =