From 517817dc46aaa82831296865529e6289b06e00b3 Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Fri, 10 Jun 2022 20:14:45 +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 Change-Id: I054650d578c30b5c865cbd7a567eb5d7c8032d01 --- .zuul.yaml | 2 +- bindep.txt | 4 + charmcraft.yaml | 5 +- osci.yaml | 2 +- requirements.txt | 8 +- src/config.yaml | 2 +- src/metadata.yaml | 1 - src/tests/bundles/focal-yoga.yaml | 81 ------------------- .../{focal-xena.yaml => jammy-zed.yaml} | 4 +- .../{impish-xena.yaml => kinetic-zed.yaml} | 2 +- src/tests/tests.yaml | 15 ++-- tox.ini | 19 +---- 12 files changed, 25 insertions(+), 120 deletions(-) create mode 100644 bindep.txt delete mode 100644 src/tests/bundles/focal-yoga.yaml rename src/tests/bundles/{focal-xena.yaml => jammy-zed.yaml} (94%) rename src/tests/bundles/{impish-xena.yaml => kinetic-zed.yaml} (98%) diff --git a/.zuul.yaml b/.zuul.yaml index 7ffc71c..23bf5f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,4 @@ - project: templates: - - openstack-python3-charm-yoga-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/charmcraft.yaml b/charmcraft.yaml index c9a0ed7..218d57a 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -21,13 +21,10 @@ parts: bases: - build-on: - name: ubuntu - channel: "20.04" + channel: "22.04" architectures: - amd64 run-on: - - name: ubuntu - channel: "20.04" - architectures: [amd64, s390x, ppc64el, arm64] - name: ubuntu channel: "22.04" architectures: [amd64, s390x, ppc64el, arm64] diff --git a/osci.yaml b/osci.yaml index 3bff244..9692976 100644 --- a/osci.yaml +++ b/osci.yaml @@ -2,8 +2,8 @@ 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: barbican diff --git a/requirements.txt b/requirements.txt index 7755b95..31f9a54 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,9 @@ # requirements.txt setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 +# 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 @@ -15,9 +18,8 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb # cryptography<3.4 -# 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 +charm-tools==2.8.3; python_version < '3.10' +git+https://github.com/juju/charm-tools.git; python_version >= '3.10' simplejson diff --git a/src/config.yaml b/src/config.yaml index bcc6955..aee1e14 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -45,6 +45,6 @@ options: description: | Maximum allowed http request size against the barbican-api. openstack-origin: - default: yoga + default: zed use-internal-endpoints: default: True diff --git a/src/metadata.yaml b/src/metadata.yaml index e0bbd0e..e3b7b3a 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -8,7 +8,6 @@ description: | tags: - openstack series: -- focal - jammy subordinate: false requires: diff --git a/src/tests/bundles/focal-yoga.yaml b/src/tests/bundles/focal-yoga.yaml deleted file mode 100644 index d9d5e31..0000000 --- a/src/tests/bundles/focal-yoga.yaml +++ /dev/null @@ -1,81 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-yoga - -local_overlay_enabled: False - -series: &series focal - -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - barbican-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - source: *openstack-origin - to: - - '0' - - '1' - - '2' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - channel: latest/edge - - barbican: - series: *series - charm: ../../../barbican.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - debug: true - to: - - '4' - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '5' - channel: latest/edge - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'barbican:shared-db' - - 'barbican-mysql-router:shared-db' - - - 'barbican-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'keystone:identity-service' - - 'barbican:identity-service' - - - - 'rabbitmq-server:amqp' - - 'barbican:amqp' diff --git a/src/tests/bundles/focal-xena.yaml b/src/tests/bundles/jammy-zed.yaml similarity index 94% rename from src/tests/bundles/focal-xena.yaml rename to src/tests/bundles/jammy-zed.yaml index 702c7d6..8f54724 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: &series focal +series: &series jammy machines: '0': diff --git a/src/tests/bundles/impish-xena.yaml b/src/tests/bundles/kinetic-zed.yaml similarity index 98% rename from src/tests/bundles/impish-xena.yaml rename to src/tests/bundles/kinetic-zed.yaml index 0f77f42..d0a3cd9 100644 --- a/src/tests/bundles/impish-xena.yaml +++ b/src/tests/bundles/kinetic-zed.yaml @@ -3,7 +3,7 @@ variables: local_overlay_enabled: False -series: &series impish +series: &series kinetic machines: '0': diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index ce31a14..ac7f38d 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,15 +1,14 @@ charm_name: barbican smoke_bundles: -- focal-xena -gate_bundles: -- focal-xena -- impish-xena -dev_bundles: -- focal-yoga - jammy-yoga +gate_bundles: +- jammy-yoga +dev_bundles: +- jammy-yoga +- jammy-zed +- kinetic-zed tests: - zaza.openstack.charm_tests.barbican.tests.BarbicanTest tests_options: force_deploy: - - impish-xena - - jammy-yoga + - kinetic-zed diff --git a/tox.ini b/tox.ini index e22fe48..6846e20 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,7 @@ setenv = VIRTUAL_ENV={envdir} 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 INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY install_command = {toxinidir}/pip.sh install {opts} {packages} allowlist_externals = @@ -68,21 +68,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 @@ -91,7 +76,7 @@ commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python3 deps = flake8==3.9.2 - charm-tools==2.8.3 + git+https://github.com/juju/charm-tools.git commands = flake8 {posargs} src unit_tests [testenv:func-target]