From 9a1325e30725963672316651932ddd89bd57934c Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Fri, 10 Jun 2022 20:14:48 +0000 Subject: [PATCH] Add Kinetic and Zed support * sync charm-helpers to classic charms * change openstack-origin/source default to zed * align testing with zed * add new zed bundles * add zed bundles to tests.yaml * add zed tests to osci.yaml and .zuul.yaml * update build-on and run-on bases * add bindep.txt for py310 * sync tox.ini and requirements.txt for ruamel * use charmcraft_channel 2.0/stable * drop reactive plugin overrides * move interface/layer env vars to charmcraft.yaml Change-Id: I2cb698f719106e54b06009f24ea47259419e9cad --- .zuul.yaml | 2 +- bindep.txt | 4 +++ osci.yaml | 4 +-- requirements.txt | 17 ------------ src/metadata.yaml | 1 - .../{focal-xena.yaml => jammy-zed.yaml} | 6 ++--- .../{focal-yoga.yaml => kinetic-zed.yaml} | 7 ++--- src/tests/tests.yaml | 9 ++++--- test-requirements.txt | 18 +------------ tox.ini | 26 +++---------------- 10 files changed, 22 insertions(+), 72 deletions(-) create mode 100644 bindep.txt rename src/tests/bundles/{focal-xena.yaml => jammy-zed.yaml} (82%) rename src/tests/bundles/{focal-yoga.yaml => kinetic-zed.yaml} (82%) diff --git a/.zuul.yaml b/.zuul.yaml index 7cb4023..23bf5f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,4 @@ - project: templates: - - openstack-python3-train-jobs + - openstack-python3-charm-zed-jobs - openstack-cover-jobs diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..17575d9 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,4 @@ +libffi-dev [platform:dpkg] +libpq-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxslt1-dev [platform:dpkg] diff --git a/osci.yaml b/osci.yaml index 1ff4ca9..ed96823 100644 --- a/osci.yaml +++ b/osci.yaml @@ -1,9 +1,7 @@ - project: templates: - - charm-unit-jobs-py38 - charm-unit-jobs-py310 - - charm-xena-functional-jobs - - charm-yoga-functional-jobs + - charm-zed-functional-jobs vars: needs_charm_build: true charm_build_name: ovn-dedicated-chassis diff --git a/requirements.txt b/requirements.txt index 358036f..8ca0e9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,24 +4,7 @@ # https://github.com/openstack-charmers/release-tools # -# Build requirements -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. - -# NOTE: newer versions of cryptography require a Rust compiler to build, -# see -# * https://github.com/openstack-charmers/zaza/issues/421 -# * https://mail.python.org/pipermail/cryptography-dev/2021-January/001003.html -# -cryptography<3.4 git+https://github.com/juju/charm-tools.git simplejson - -# Newer versions use keywords that didn't exist in python 3.5 yet (e.g. -# "ModuleNotFoundError") -# NOTE(lourot): This might look like a duplication of test-requirements.txt but -# some tox targets use only test-requirements.txt whereas charm-build uses only -# requirements.txt -importlib-metadata<3.0.0; python_version < '3.6' -importlib-resources<3.0.0; python_version < '3.6' diff --git a/src/metadata.yaml b/src/metadata.yaml index e07c5f4..4e971b2 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -7,7 +7,6 @@ description: | tags: - networking series: -- focal - jammy subordinate: false extra-bindings: diff --git a/src/tests/bundles/focal-xena.yaml b/src/tests/bundles/jammy-zed.yaml similarity index 82% rename from src/tests/bundles/focal-xena.yaml rename to src/tests/bundles/jammy-zed.yaml index edf3bfb..4d0b6f8 100644 --- a/src/tests/bundles/focal-xena.yaml +++ b/src/tests/bundles/jammy-zed.yaml @@ -1,9 +1,9 @@ variables: - openstack-origin: &openstack-origin cloud:focal-xena + openstack-origin: &openstack-origin cloud:jammy-zed local_overlay_enabled: False -series: focal +series: jammy applications: @@ -22,7 +22,7 @@ applications: channel: latest/edge ovn-dedicated-chassis: - charm: ../../../ovn-dedicated-chassis_ubuntu-20.04-amd64.charm + charm: ../../../ovn-dedicated-chassis_ubuntu-22.04-amd64.charm num_units: 2 options: source: *openstack-origin diff --git a/src/tests/bundles/focal-yoga.yaml b/src/tests/bundles/kinetic-zed.yaml similarity index 82% rename from src/tests/bundles/focal-yoga.yaml rename to src/tests/bundles/kinetic-zed.yaml index 76193fb..fc4e3d2 100644 --- a/src/tests/bundles/focal-yoga.yaml +++ b/src/tests/bundles/kinetic-zed.yaml @@ -1,9 +1,9 @@ variables: - openstack-origin: &openstack-origin cloud:focal-yoga + openstack-origin: &openstack-origin distro local_overlay_enabled: False -series: focal +series: kinetic applications: @@ -22,11 +22,12 @@ applications: channel: latest/edge ovn-dedicated-chassis: - charm: ../../../ovn-dedicated-chassis_ubuntu-20.04-amd64.charm + charm: ../../../ovn-dedicated-chassis_ubuntu-22.04-amd64.charm num_units: 2 options: source: *openstack-origin + relations: - - 'ovn-central:certificates' diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index a9ab7e9..373bc1e 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,14 +1,15 @@ charm_name: ovn-dedicated-chassis gate_bundles: -- focal-xena -- focal-yoga +- jammy-yoga smoke_bundles: -- focal-yoga +- jammy-yoga dev_bundles: - jammy-yoga +- jammy-zed +- kinetic-zed target_deploy_status: ovn-central: @@ -30,4 +31,4 @@ tests: tests_options: force_deploy: - - jammy-yoga + - kinetic-zed diff --git a/test-requirements.txt b/test-requirements.txt index a11a7d0..a7936e6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,6 @@ # https://github.com/openstack-charmers/release-tools # pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 stestr>=2.2.0 @@ -13,25 +12,10 @@ stestr>=2.2.0 # https://github.com/mtreinish/stestr/issues/145 cliff<3.0.0 -# Dependencies of stestr. Newer versions use keywords that didn't exist in -# python 3.5 yet (e.g. "ModuleNotFoundError") -importlib-metadata<3.0.0; python_version < '3.6' -importlib-resources<3.0.0; python_version < '3.6' - -# Some Zuul nodes sometimes pull newer versions of these dependencies which -# dropped support for python 3.5: -osprofiler<2.7.0;python_version<'3.6' -stevedore<1.31.0;python_version<'3.6' -debtcollector<1.22.0;python_version<'3.6' -oslo.utils<=3.41.0;python_version<'3.6' - requests>=2.18.4 charms.reactive -# Newer mock seems to have some syntax which is newer than python3.5 (e.g. -# f'{something}' -mock>=1.2,<4.0.0; python_version < '3.6' -mock>=1.2; python_version >= '3.6' +mock>=1.2 nose>=1.3.7 coverage>=3.6 diff --git a/tox.ini b/tox.ini index b80a039..26830eb 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 TERM=linux JUJU_REPOSITORY={toxinidir}/build -passenv = no_proxy http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY +passenv = no_proxy http_proxy https_proxy JUJU_REPOSITORY install_command = {toxinidir}/pip.sh install {opts} {packages} allowlist_externals = @@ -52,28 +52,8 @@ basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} -[testenv:py35] -basepython = python3.5 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py36] -basepython = python3.6 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py37] -basepython = python3.7 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py38] -basepython = python3.8 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py39] -basepython = python3.9 +[testenv:py310] +basepython = python3.10 deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs}