From c7f5f8e269b423cb938c59b3ff16d2423d86bfdb Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Fri, 10 Jun 2022 20:14:47 +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: Idf4a6cd1e0888576f890b00aa5b343936900d6dd Depends-On: https://review.opendev.org/c/openstack/charm-ironic-conductor/+/858752 --- .zuul.yaml | 2 +- charmcraft.yaml | 68 ++++++++++++------- osci.yaml | 4 +- requirements.txt | 11 +-- src/config.yaml | 2 +- src/metadata.yaml | 2 +- src/tests/bundles/jammy-yoga.yaml | 2 +- .../{focal-yoga.yaml => jammy-zed.yaml} | 6 +- .../{focal-xena.yaml => kinetic-zed.yaml} | 7 +- src/tests/tests.yaml | 13 ++-- src/wheelhouse.txt | 2 +- tox.ini | 19 +----- 12 files changed, 65 insertions(+), 73 deletions(-) rename src/tests/bundles/{focal-yoga.yaml => jammy-zed.yaml} (98%) rename src/tests/bundles/{focal-xena.yaml => kinetic-zed.yaml} (98%) diff --git a/.zuul.yaml b/.zuul.yaml index fd20909..23bf5f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,4 @@ - project: templates: - - openstack-python3-charm-jobs + - openstack-python3-charm-zed-jobs - openstack-cover-jobs diff --git a/charmcraft.yaml b/charmcraft.yaml index 194893f..158de6c 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -31,27 +31,47 @@ parts: chmod +x src/charm.py bases: - - name: ubuntu - channel: "20.04" - architectures: [amd64] - - name: ubuntu - channel: "20.04" - architectures: [arm64] - - name: ubuntu - channel: "20.04" - architectures: [ppc64el] - - name: ubuntu - channel: "20.04" - architectures: [s390x] - - name: ubuntu - channel: "22.04" - architectures: [amd64] - - name: ubuntu - channel: "22.04" - architectures: [arm64] - - name: ubuntu - channel: "22.04" - architectures: [ppc64el] - - name: ubuntu - channel: "22.04" - architectures: [s390x] + - build-on: + - name: ubuntu + channel: "22.04" + architectures: [amd64] + run-on: + - name: ubuntu + channel: "22.04" + architectures: [amd64] + - name: ubuntu + channel: "22.10" + architectures: [amd64] + - build-on: + - name: ubuntu + channel: "22.04" + architectures: [arm64] + run-on: + - name: ubuntu + channel: "22.04" + architectures: [arm64] + - name: ubuntu + channel: "22.10" + architectures: [arm64] + - build-on: + - name: ubuntu + channel: "22.04" + architectures: [ppc64el] + run-on: + - name: ubuntu + channel: "22.04" + architectures: [ppc64el] + - name: ubuntu + channel: "22.10" + architectures: [ppc64el] + - build-on: + - name: ubuntu + channel: "22.04" + architectures: [s390x] + run-on: + - name: ubuntu + channel: "22.04" + architectures: [s390x] + - name: ubuntu + channel: "22.10" + architectures: [s390x] diff --git a/osci.yaml b/osci.yaml index da53c6d..2184d3d 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: ironic-conductor diff --git a/requirements.txt b/requirements.txt index 7cf6854..38a4189 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,15 +5,6 @@ # # Build requirements -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. -git+https://github.com/juju/charm-tools#egg=charm-tools +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/config.yaml b/src/config.yaml index e06ce3a..a9e85ed 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -1,6 +1,6 @@ options: openstack-origin: - default: yoga + default: zed type: string description: | Repository from which to install. May be one of the following: diff --git a/src/metadata.yaml b/src/metadata.yaml index 6cc7ab6..1071aaa 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -13,8 +13,8 @@ tags: - openstack - baremetal series: -- focal - jammy +- kinetic extra-bindings: deployment: cleaning: diff --git a/src/tests/bundles/jammy-yoga.yaml b/src/tests/bundles/jammy-yoga.yaml index 45e6c0d..a87530d 100644 --- a/src/tests/bundles/jammy-yoga.yaml +++ b/src/tests/bundles/jammy-yoga.yaml @@ -283,7 +283,7 @@ services: openstack-origin: *source channel: latest/edge ironic-conductor: - charm: ../../../ironic-conductor_ubuntu-22.04-amd64.charm + charm: ../../../ironic-conductor_ubuntu-22.04-amd64_ubuntu-22.10-amd64.charm num_units: 1 constraints: mem=2G options: diff --git a/src/tests/bundles/focal-yoga.yaml b/src/tests/bundles/jammy-zed.yaml similarity index 98% rename from src/tests/bundles/focal-yoga.yaml rename to src/tests/bundles/jammy-zed.yaml index 813b240..d063b5c 100644 --- a/src/tests/bundles/focal-yoga.yaml +++ b/src/tests/bundles/jammy-zed.yaml @@ -1,8 +1,8 @@ local_overlay_enabled: False options: - source: &source cloud:focal-yoga -series: focal + source: &source cloud:jammy-zed +series: jammy relations: - - nova-ironic - ironic-api @@ -283,7 +283,7 @@ services: openstack-origin: *source channel: latest/edge ironic-conductor: - charm: ../../../ironic-conductor_ubuntu-20.04-amd64.charm + charm: ../../../ironic-conductor_ubuntu-22.04-amd64_ubuntu-22.10-amd64.charm num_units: 1 constraints: mem=2G options: diff --git a/src/tests/bundles/focal-xena.yaml b/src/tests/bundles/kinetic-zed.yaml similarity index 98% rename from src/tests/bundles/focal-xena.yaml rename to src/tests/bundles/kinetic-zed.yaml index f34a731..1c42847 100644 --- a/src/tests/bundles/focal-xena.yaml +++ b/src/tests/bundles/kinetic-zed.yaml @@ -1,9 +1,8 @@ local_overlay_enabled: False options: - source: &source cloud:focal-xena -series: focal - + source: &source distro +series: kinetic relations: - - nova-ironic - ironic-api @@ -284,7 +283,7 @@ services: openstack-origin: *source channel: latest/edge ironic-conductor: - charm: ../../../ironic-conductor_ubuntu-20.04-amd64.charm + charm: ../../../ironic-conductor_ubuntu-22.04-amd64_ubuntu-22.10-amd64.charm num_units: 1 constraints: mem=2G options: diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index 08a4d61..df2a824 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -4,14 +4,15 @@ charm_name: ironic-api gate_bundles: -- focal-xena - -dev_bundles: -- focal-yoga - jammy-yoga +dev_bundles: +- jammy-yoga +- jammy-zed +- kinetic-zed + smoke_bundles: - - focal-xena + - focal-yoga target_deploy_status: vault: @@ -38,4 +39,4 @@ tests: tests_options: force_deploy: - - jammy-yoga + - kinetic-zed diff --git a/src/wheelhouse.txt b/src/wheelhouse.txt index 57c9e5d..be34836 100644 --- a/src/wheelhouse.txt +++ b/src/wheelhouse.txt @@ -17,7 +17,7 @@ zipp < 2.0.0 # on the machine during install, this breaks installs. Instead pin to <3.4 until a solution can be # found that doesn't require compiling on the target machine. # LP: #1915171 -cryptography<3.4 +cryptography pyrsistent<0.18.0 iso8601<1.0.0 diff --git a/tox.ini b/tox.ini index e649e6a..6df34e5 100644 --- a/tox.ini +++ b/tox.ini @@ -19,10 +19,8 @@ minversion = 3.18.0 setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 TERM=linux - LAYER_PATH={toxinidir}/layers - INTERFACE_PATH={toxinidir}/interfaces JUJU_REPOSITORY={toxinidir}/build -passenv = 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 = @@ -54,21 +52,6 @@ basepython = python3 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:py38] -basepython = python3.8 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - -[testenv:py39] -basepython = python3.9 -deps = -r{toxinidir}/test-requirements.txt -commands = stestr run --slowest {posargs} - [testenv:py310] basepython = python3.10 deps = -r{toxinidir}/test-requirements.txt