From 846cced90cd2d9ebe8276c81880f1cb00b6e7e27 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Tue, 10 Aug 2021 09:24:34 -0400 Subject: [PATCH] py3: Add py39 gate for sysinv Add python 3.9 gate for sysinv. Make the gate non-voting for now since the unit tests do not pass for now. A seperate commit is coming to fix the unit tests. Update the bindep.txt to install missing packages in the ubuntu-focal image. Also update the requirements to fix dependencies for python3.6 and install dependencies that are python2.7 only. Story: 2006796 Task: 42975 Signed-off-by: Charles Short Change-Id: I2512e276c8517132f952cdec0affa8cea8565035 --- .zuul.yaml | 20 ++++++++++++++++++++ bindep.txt | 5 +++++ sysinv/sysinv/sysinv/requirements.txt | 4 +++- sysinv/sysinv/sysinv/tox.ini | 12 +++++++++++- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index d729cc0a4d..47729b5aa1 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -9,6 +9,7 @@ - openstack-tox-linters - sysinv-tox-py27 - sysinv-tox-py36 + - sysinv-tox-py39 - sysinv-tox-flake8 - sysinv-tox-pylint - sysinv-tox-bandit @@ -30,6 +31,7 @@ - openstack-tox-linters - sysinv-tox-py27 - sysinv-tox-py36 + - sysinv-tox-py39 - sysinv-tox-flake8 - sysinv-tox-pylint - sysinv-tox-bandit @@ -82,6 +84,24 @@ tox_envlist: py36 tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini +- job: + name: sysinv-tox-py39 + parent: tox-py39 + description: | + Run py39 test for sysinv + nodeset: debian-bullseye + required-projects: + - starlingx/fault + - starlingx/update + - starlingx/utilities + - starlingx/root + files: + - sysinv/sysinv/* + vars: + tox_envlist: py39 + python_version: 3.9 + tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini + - job: name: sysinv-tox-flake8 parent: tox diff --git a/bindep.txt b/bindep.txt index 06000dbbff..3ffe69f3f6 100644 --- a/bindep.txt +++ b/bindep.txt @@ -2,4 +2,9 @@ # see https://docs.openstack.org/infra/bindep/ for additional information. libffi-dev [platform:dpkg] +libldap2-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxslt1-dev [platform:dpkg] +libsasl2-dev [platform:dpkg] libffi-devel [platform:rpm] +python3-all-dev [platform:dpkg] diff --git a/sysinv/sysinv/sysinv/requirements.txt b/sysinv/sysinv/sysinv/requirements.txt index 52dc175422..b02fbb077b 100644 --- a/sysinv/sysinv/sysinv/requirements.txt +++ b/sysinv/sysinv/sysinv/requirements.txt @@ -1,4 +1,4 @@ -pathlib +pathlib;python_version=='2.7' pbr>=0.5 SQLAlchemy amqplib>=0.6.1 @@ -52,3 +52,5 @@ python-ldap>=3.1.0 psycopg2-binary python-barbicanclient rfc3986 +importlib-metadata>=3.3.0;python_version=="3.6" +importlib-resources===5.2.2;python_version=="3.6" diff --git a/sysinv/sysinv/sysinv/tox.ini b/sysinv/sysinv/sysinv/tox.ini index 1271007244..e6e1cfe879 100644 --- a/sysinv/sysinv/sysinv/tox.ini +++ b/sysinv/sysinv/sysinv/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = flake8,py27,py36,pylint +envlist = flake8,py27,py36,py39,pylint minversion = 1.6 skipsdist = True @@ -116,6 +116,16 @@ commands = stestr run {posargs} stestr slowest +[testenv:py39] +basepython = python3.9 +install_command = pip install -v -v -v \ + -c{[tox]stxdir}/root/build-tools/requirements/debian/upper-constraints.txt \ + {opts} {packages} +commands = + stestr run {posargs} + stestr slowest + + [testenv:pep8] # testenv:flake8 clone basepython = python3