diff --git a/build-requirements.txt b/build-requirements.txt deleted file mode 100644 index b6d2452..0000000 --- a/build-requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -# NOTES(lourot): -# * We don't install charmcraft via pip anymore because it anyway spins up a -# container and scp the system's charmcraft snap inside it. So the charmcraft -# snap is necessary on the system anyway. -# * `tox -e build` successfully validated with charmcraft 1.2.1 - -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. diff --git a/charmcraft.yaml b/charmcraft.yaml index 242452c..34da566 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -2,34 +2,33 @@ type: charm parts: charm: - charm-entrypoint: "hooks/install" + plugin: reactive + reactive-charm-build-arguments: + - --binary-wheels-from-source build-packages: - tox - git - python3-dev - libffi-dev - override-build: | - apt-get install ca-certificates -y - tox -e build-reactive - override-stage: | - echo "Copying charm to staging area: $CRAFT_STAGE" - NAME=$(ls $CRAFT_PART_BUILD/build/builds) - cp -r $CRAFT_PART_BUILD/build/builds/$NAME/* $CRAFT_STAGE/ - override-prime: | - # For some reason, the normal priming chokes on the fact that there's a - # hooks directory. - cp -r $CRAFT_STAGE/* . + source: src/ + build-snaps: + - charm/latest/edge + build-environment: + - CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/ + - CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/ -bases: - - build-on: - - name: ubuntu - channel: "20.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] +base: ubuntu@24.04 +build-base: ubuntu@24.04 +platforms: + amd64: + build-on: amd64 + build-for: amd64 + arm64: + build-on: arm64 + build-for: arm64 + s390x: + build-on: s390x + build-for: s390x + ppc64el: + build-on: ppc64el + build-for: ppc64el diff --git a/osci.yaml b/osci.yaml index ec739f3..a90a296 100644 --- a/osci.yaml +++ b/osci.yaml @@ -2,10 +2,9 @@ templates: - charm-unit-jobs-py38 - charm-unit-jobs-py39 - - charm-yoga-functional-jobs - charm-functional-jobs vars: needs_charm_build: true charm_build_name: ceph-fs build_type: charmcraft - charmcraft_channel: 2.x/stable + charmcraft_channel: 3.x/beta diff --git a/pip.sh b/pip.sh deleted file mode 100755 index 9a7e6b0..0000000 --- a/pip.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# -# This file is managed centrally by release-tools and should not be modified -# within individual charm repos. See the 'global' dir contents for available -# choices of tox.ini for OpenStack Charms: -# https://github.com/openstack-charmers/release-tools -# -# setuptools 58.0 dropped the support for use_2to3=true which is needed to -# install blessings (an indirect dependency of charm-tools). -# -# More details on the beahvior of tox and virtualenv creation can be found at -# https://github.com/tox-dev/tox/issues/448 -# -# This script is wrapper to force the use of the pinned versions early in the -# process when the virtualenv was created and upgraded before installing the -# depedencies declared in the target. -pip install 'pip<20.3' 'setuptools<50.0.0' -pip "$@" diff --git a/requirements.txt b/requirements.txt index b3dc23f..2908128 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,3 @@ -# This file is managed centrally by release-tools and should not be modified -# within individual charm repos. See the 'global' dir contents for available -# choices of *requirements.txt files for OpenStack Charms: -# https://github.com/openstack-charmers/release-tools -# -# 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 -setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 - # NOTE: newer versions of cryptography require a Rust compiler to build, # see # * https://github.com/openstack-charmers/zaza/issues/421 diff --git a/src/build.lock b/src/build.lock index 220ef7c..a41bbd2 100644 --- a/src/build.lock +++ b/src/build.lock @@ -13,8 +13,8 @@ "item": "layer:basic", "url": "https://github.com/juju-solutions/layer-basic.git", "vcs": null, - "branch": "1edd5ccd3fb6240ca734b64a7dae9f1cb30b66f6", - "commit": "1edd5ccd3fb6240ca734b64a7dae9f1cb30b66f6" + "branch": "33526bd6aaa01ffe717a5c66ed62bc4790344ef2", + "commit": "33526bd6aaa01ffe717a5c66ed62bc4790344ef2" }, { "type": "layer", @@ -26,27 +26,19 @@ }, { "type": "layer", - "item": "layer:openstack-principle", - "url": "https://github.com/openstack/charm-layer-openstack-principle", + "item": "layer:ceph", + "url": "https://github.com/openstack/charm-layer-ceph.git", "vcs": null, - "branch": "2541283a7f9c3fa923c0fccd7257e217e11dadcd", - "commit": "2541283a7f9c3fa923c0fccd7257e217e11dadcd" + "branch": "17d40abd8d9ec3b8c32756ca981c80c4733c016f", + "commit": "17d40abd8d9ec3b8c32756ca981c80c4733c016f" }, { "type": "layer", - "item": "layer:openstack-api", - "url": "https://github.com/openstack/charm-layer-openstack-api", - "vcs": null, - "branch": "34311a62e963d0ce903b7ddb9d70b8f071f71651", - "commit": "34311a62e963d0ce903b7ddb9d70b8f071f71651" - }, - { - "type": "layer", - "item": "aodh", + "item": "ceph-fs", "url": null, "vcs": null, - "branch": null, - "commit": "" + "branch": "e6c6f13cde785174cee1a48a8df1c581e394fc3b", + "commit": "e6c6f13cde785174cee1a48a8df1c581e394fc3b" }, { "type": "layer", @@ -58,65 +50,25 @@ }, { "type": "layer", - "item": "interface:mysql-shared", - "url": "https://github.com/openstack/charm-interface-mysql-shared", + "item": "interface:ceph-mds", + "url": "https://opendev.org/openstack/charm-interface-ceph-client.git", "vcs": null, - "branch": "f90f8c6edce21e4da3a872f0f9d6761730ce025d", - "commit": "f90f8c6edce21e4da3a872f0f9d6761730ce025d" + "branch": "d9f3b53ca0cf30e47347a68beab59da5c03ce4c7", + "commit": "d9f3b53ca0cf30e47347a68beab59da5c03ce4c7" }, { "type": "layer", - "item": "interface:rabbitmq", - "url": "https://github.com/openstack/charm-interface-rabbitmq", + "item": "interface:cephfs_share", + "url": null, "vcs": null, - "branch": "383121fc584d2d3bf9d233eba0d3708398a4c468", - "commit": "383121fc584d2d3bf9d233eba0d3708398a4c468" - }, - { - "type": "layer", - "item": "interface:keystone", - "url": "https://github.com/openstack/charm-interface-keystone", - "vcs": null, - "branch": "36ea7b385a569ebabca7184ed4ce8420bb8fa61a", - "commit": "36ea7b385a569ebabca7184ed4ce8420bb8fa61a" - }, - { - "type": "layer", - "item": "interface:hacluster", - "url": "https://github.com/openstack/charm-interface-hacluster.git", - "vcs": null, - "branch": "d91e83a1fa59a13f4160febfe536c68dc762e436", - "commit": "d91e83a1fa59a13f4160febfe536c68dc762e436" - }, - { - "type": "layer", - "item": "interface:openstack-ha", - "url": "https://github.com/openstack/charm-interface-openstack-ha", - "vcs": null, - "branch": "a3b00e5b5fd857d130698c5cfe4b918877f0ab80", - "commit": "a3b00e5b5fd857d130698c5cfe4b918877f0ab80" - }, - { - "type": "layer", - "item": "interface:mongodb", - "url": "https://github.com/cloud-green/juju-relation-mongodb", - "vcs": null, - "branch": "708b6ade852794b17447024a28e5ec2bb883538c", - "commit": "708b6ade852794b17447024a28e5ec2bb883538c" - }, - { - "type": "layer", - "item": "interface:nrpe-external-master", - "url": "https://github.com/canonical/nrpe-external-master-interface", - "vcs": null, - "branch": "c58fe7b01a151d933681b5bf67e47ad3de65eeaa", - "commit": "c58fe7b01a151d933681b5bf67e47ad3de65eeaa" + "branch": "e6c6f13cde785174cee1a48a8df1c581e394fc3b", + "commit": "e6c6f13cde785174cee1a48a8df1c581e394fc3b" }, { "type": "python_module", - "package": "trove-classifiers", + "package": "dnspython3", "vcs": null, - "version": "2024.4.10" + "version": "1.12.0" }, { "type": "python_module", @@ -124,41 +76,17 @@ "vcs": null, "version": "0.11.0" }, - { - "type": "python_module", - "package": "dnspython", - "vcs": null, - "version": "2.6.1" - }, - { - "type": "python_module", - "package": "netaddr", - "vcs": null, - "version": "0.7.19" - }, { "type": "python_module", "package": "packaging", "vcs": null, - "version": "24.0" + "version": "24.1" }, { "type": "python_module", - "package": "pluggy", + "package": "setuptools", "vcs": null, - "version": "1.5.0" - }, - { - "type": "python_module", - "package": "anyio", - "vcs": null, - "version": "3.6.2" - }, - { - "type": "python_module", - "package": "tomli", - "vcs": null, - "version": "2.0.1" + "version": "71.1.0" }, { "type": "python_module", @@ -168,73 +96,29 @@ }, { "type": "python_module", - "package": "idna", + "package": "flit_scm", "vcs": null, - "version": "3.7" + "version": "1.7.0" }, { "type": "python_module", - "package": "calver", - "vcs": null, - "version": "2022.6.26" - }, - { - "type": "python_module", - "package": "wheel", - "vcs": null, - "version": "0.43.0" - }, - { - "type": "python_module", - "package": "pip", - "vcs": null, - "version": "22.0.4" - }, - { - "type": "python_module", - "package": "setuptools", - "vcs": null, - "version": "62.1.0" + "package": "charms.reactive", + "url": "git+https://github.com/canonical/charms.reactive.git", + "branch": "0dc82abb7ac01f288042ee44b56a9d428c8fc46c", + "version": "0dc82abb7ac01f288042ee44b56a9d428c8fc46c", + "vcs": "git" }, { "type": "python_module", "package": "psutil", "vcs": null, - "version": "5.9.8" + "version": "6.0.0" }, { "type": "python_module", - "package": "charms.openstack", - "url": "git+https://github.com/openstack/charms.openstack.git", - "branch": "stable/caracal", - "version": "018b72d734223db274b59f524b7887d8153cdb6d", - "vcs": "git" - }, - { - "type": "python_module", - "package": "charmhelpers", - "url": "git+https://github.com/juju/charm-helpers.git", - "branch": "stable/caracal", - "version": "807f705d1d132bedb62b2eb743403e1d5867360f", - "vcs": "git" - }, - { - "type": "python_module", - "package": "pathspec", + "package": "pyxattr", "vcs": null, - "version": "0.12.1" - }, - { - "type": "python_module", - "package": "hatchling", - "vcs": null, - "version": "1.24.2" - }, - { - "type": "python_module", - "package": "Cython", - "vcs": null, - "version": "0.29.37" + "version": "0.8.1" }, { "type": "python_module", @@ -242,6 +126,18 @@ "vcs": null, "version": "2.1.5" }, + { + "type": "python_module", + "package": "trove_classifiers", + "vcs": null, + "version": "2024.7.2" + }, + { + "type": "python_module", + "package": "flit_core", + "vcs": null, + "version": "3.9.0" + }, { "type": "python_module", "package": "PyYAML", @@ -250,27 +146,53 @@ }, { "type": "python_module", - "package": "charms.reactive", - "vcs": null, - "version": "1.5.2" + "package": "charmhelpers", + "url": "git+https://github.com/juju/charm-helpers.git", + "branch": "1b2d4dc8f8effd79d782241a32a0485af1f01e73", + "version": "1b2d4dc8f8effd79d782241a32a0485af1f01e73", + "vcs": "git" }, { "type": "python_module", - "package": "sniffio", + "package": "pip", "vcs": null, - "version": "1.3.0" + "version": "22.0.4" }, { "type": "python_module", - "package": "setuptools_scm", + "package": "calver", "vcs": null, - "version": "6.4.2" + "version": "2022.6.26" }, { "type": "python_module", - "package": "Jinja2", + "package": "pluggy", "vcs": null, - "version": "3.1.3" + "version": "1.5.0" + }, + { + "type": "python_module", + "package": "pyudev", + "vcs": null, + "version": "0.24.3" + }, + { + "type": "python_module", + "package": "six", + "vcs": null, + "version": "1.16.0" + }, + { + "type": "python_module", + "package": "pathspec", + "vcs": null, + "version": "0.12.1" + }, + { + "type": "python_module", + "package": "jinja2", + "vcs": null, + "version": "3.1.4" }, { "type": "python_module", @@ -280,15 +202,67 @@ }, { "type": "python_module", - "package": "flit_scm", - "vcs": null, - "version": "1.7.0" + "package": "charms.ceph", + "url": "git+https://github.com/openstack/charms.ceph.git", + "branch": "64f3c1b12b14545a76321469478fb456b379832d", + "version": "64f3c1b12b14545a76321469478fb456b379832d", + "vcs": "git" }, { "type": "python_module", - "package": "flit_core", + "package": "looseversion", "vcs": null, - "version": "3.9.0" + "version": "1.3.0" + }, + { + "type": "python_module", + "package": "hatchling", + "vcs": null, + "version": "1.25.0" + }, + { + "type": "python_module", + "package": "netaddr", + "vcs": null, + "version": "0.7.19" + }, + { + "type": "python_module", + "package": "Cython", + "vcs": null, + "version": "0.29.37" + }, + { + "type": "python_module", + "package": "charms.openstack", + "url": "git+https://github.com/openstack/charms.openstack.git", + "branch": "355d65f64cc1dac133d885aa7cfc58b1804a0c30", + "version": "355d65f64cc1dac133d885aa7cfc58b1804a0c30", + "vcs": "git" + }, + { + "type": "python_module", + "package": "wheel", + "vcs": null, + "version": "0.43.0" + }, + { + "type": "python_module", + "package": "dnspython", + "vcs": null, + "version": "2.6.1" + }, + { + "type": "python_module", + "package": "ceph_api", + "vcs": null, + "version": "0.4.0" + }, + { + "type": "python_module", + "package": "setuptools_scm", + "vcs": null, + "version": "8.1.0" } ] } \ No newline at end of file diff --git a/src/metadata.yaml b/src/metadata.yaml index cc812f9..19f00b0 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -11,8 +11,7 @@ tags: - file-servers - misc series: -- focal -- jammy +- noble subordinate: false requires: ceph-mds: diff --git a/src/tests/bundles/focal-yoga.yaml b/src/tests/bundles/focal-yoga.yaml deleted file mode 100644 index 718084b..0000000 --- a/src/tests/bundles/focal-yoga.yaml +++ /dev/null @@ -1,44 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:focal-yoga - -local_overlay_enabled: False - -series: &series focal - -applications: - ubuntu: # used to test mounts - charm: ch:ubuntu - num_units: 2 - ceph-fs: - charm: ../../../ceph-fs.charm - num_units: 1 - options: - source: *openstack-origin - pool-type: erasure-coded - ec-profile-k: 4 - ec-profile-m: 2 - - ceph-osd: - charm: ch:ceph-osd - num_units: 6 - storage: - osd-devices: 'cinder,10G' - options: - osd-devices: '/dev/test-non-existent' - source: *openstack-origin - channel: latest/edge - - ceph-mon: - charm: ch:ceph-mon - num_units: 3 - options: - monitor-count: '3' - source: *openstack-origin - channel: latest/edge - -relations: - - - 'ceph-mon:mds' - - 'ceph-fs:ceph-mds' - - - - 'ceph-osd:mon' - - 'ceph-mon:osd' diff --git a/src/tests/bundles/jammy-antelope.yaml b/src/tests/bundles/jammy-antelope.yaml deleted file mode 100644 index dfab58f..0000000 --- a/src/tests/bundles/jammy-antelope.yaml +++ /dev/null @@ -1,44 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-antelope - -local_overlay_enabled: False - -series: &series jammy - -applications: - ubuntu: # used to test mounts - charm: ch:ubuntu - num_units: 2 - ceph-fs: - charm: ../../../ceph-fs.charm - num_units: 1 - options: - source: *openstack-origin - pool-type: erasure-coded - ec-profile-k: 4 - ec-profile-m: 2 - - ceph-osd: - charm: ch:ceph-osd - num_units: 6 - storage: - osd-devices: 'cinder,10G' - options: - osd-devices: '/dev/test-non-existent' - source: *openstack-origin - channel: reef/edge - - ceph-mon: - charm: ch:ceph-mon - num_units: 3 - options: - monitor-count: '3' - source: *openstack-origin - channel: reef/edge - -relations: - - - 'ceph-mon:mds' - - 'ceph-fs:ceph-mds' - - - - 'ceph-osd:mon' - - 'ceph-mon:osd' diff --git a/src/tests/bundles/jammy-bobcat.yaml b/src/tests/bundles/jammy-bobcat.yaml deleted file mode 100644 index 09ab531..0000000 --- a/src/tests/bundles/jammy-bobcat.yaml +++ /dev/null @@ -1,44 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-bobcat - -local_overlay_enabled: False - -series: &series jammy - -applications: - ubuntu: # used to test mounts - charm: ch:ubuntu - num_units: 2 - ceph-fs: - charm: ../../../ceph-fs.charm - num_units: 1 - options: - source: *openstack-origin - pool-type: erasure-coded - ec-profile-k: 4 - ec-profile-m: 2 - - ceph-osd: - charm: ch:ceph-osd - num_units: 6 - storage: - osd-devices: 'cinder,10G' - options: - osd-devices: '/dev/test-non-existent' - source: *openstack-origin - channel: latest/edge - - ceph-mon: - charm: ch:ceph-mon - num_units: 3 - options: - monitor-count: '3' - source: *openstack-origin - channel: latest/edge - -relations: - - - 'ceph-mon:mds' - - 'ceph-fs:ceph-mds' - - - - 'ceph-osd:mon' - - 'ceph-mon:osd' diff --git a/src/tests/bundles/jammy-caracal.yaml b/src/tests/bundles/jammy-caracal.yaml deleted file mode 100644 index 82ad470..0000000 --- a/src/tests/bundles/jammy-caracal.yaml +++ /dev/null @@ -1,44 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-caracal - -local_overlay_enabled: False - -series: &series jammy - -applications: - ubuntu: # used to test mounts - charm: ch:ubuntu - num_units: 2 - ceph-fs: - charm: ../../../ceph-fs.charm - num_units: 1 - options: - source: *openstack-origin - pool-type: erasure-coded - ec-profile-k: 4 - ec-profile-m: 2 - - ceph-osd: - charm: ch:ceph-osd - num_units: 6 - storage: - osd-devices: 'cinder,10G' - options: - osd-devices: '/dev/test-non-existent' - source: *openstack-origin - channel: latest/edge - - ceph-mon: - charm: ch:ceph-mon - num_units: 3 - options: - monitor-count: '3' - source: *openstack-origin - channel: latest/edge - -relations: - - - 'ceph-mon:mds' - - 'ceph-fs:ceph-mds' - - - - 'ceph-osd:mon' - - 'ceph-mon:osd' diff --git a/src/tests/bundles/jammy-yoga.yaml b/src/tests/bundles/noble-caracal.yaml similarity index 95% rename from src/tests/bundles/jammy-yoga.yaml rename to src/tests/bundles/noble-caracal.yaml index 2a428f1..daf7829 100644 --- a/src/tests/bundles/jammy-yoga.yaml +++ b/src/tests/bundles/noble-caracal.yaml @@ -3,12 +3,13 @@ variables: local_overlay_enabled: False -series: &series jammy +series: &series noble applications: ubuntu: # used to test mounts charm: ch:ubuntu num_units: 2 + series: jammy ceph-fs: charm: ../../../ceph-fs.charm num_units: 1 diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index a3c820a..d07fe8a 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,12 +1,8 @@ charm_name: ceph-fs gate_bundles: - - focal-xena - - focal-yoga - - jammy-yoga - - jammy-bobcat - - mantic-bobcat + - noble-caracal smoke_bundles: - - focal-xena + - noble-caracal # configure: # - zaza.openstack.charm_tests.glance.setup.add_lts_image # - zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network diff --git a/src/tox.ini b/src/tox.ini index b40d295..2ddcccd 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -6,32 +6,28 @@ [tox] envlist = pep8 -skipsdist = True # NOTE: Avoid build/test env pollution by not enabling sitepackages. sitepackages = False # NOTE: Avoid false positives by not skipping missing interpreters. skip_missing_interpreters = False -# NOTES: -# * We avoid the new dependency resolver by pinning pip < 20.3, see -# https://github.com/pypa/pip/issues/9187 -# * Pinning dependencies requires tox >= 3.2.0, see -# https://tox.readthedocs.io/en/latest/config.html#conf-requires -# * It is also necessary to pin virtualenv as a newer virtualenv would still -# lead to fetching the latest pip in the func* tox targets, see -# https://stackoverflow.com/a/38133283 -requires = pip < 20.3 - virtualenv < 20.0 -# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci -minversion = 3.18.0 [testenv] +# We use tox mainly for virtual environment management for test requirements +# and do not install the charm code as a Python package into that environment. +# Ref: https://tox.wiki/en/latest/config.html#skip_install +skip_install = True setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 allowlist_externals = juju -passenv = HOME TERM CS_* OS_* TEST_* -deps = -r{toxinidir}/test-requirements.txt -install_command = - pip install {opts} {packages} +passenv = + HOME + TERM + CS_* + OS_* + TEST_* +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/test-requirements.txt [testenv:pep8] basepython = python3 diff --git a/src/wheelhouse.txt b/src/wheelhouse.txt index 303c396..ffeddd4 100644 --- a/src/wheelhouse.txt +++ b/src/wheelhouse.txt @@ -9,3 +9,6 @@ git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack git+https://github.com/openstack/charms.ceph.git#egg=charms.ceph git+https://github.com/juju/charm-helpers.git#egg=charmhelpers + +# https://github.com/canonical/charms.reactive/pull/260 +git+https://github.com/canonical/charms.reactive.git#egg=charms.reactive diff --git a/tox.ini b/tox.ini index 50527f5..2b4a697 100644 --- a/tox.ini +++ b/tox.ini @@ -5,50 +5,36 @@ # https://github.com/openstack-charmers/release-tools [tox] -skipsdist = True envlist = pep8,py3 # NOTE: Avoid build/test env pollution by not enabling sitepackages. sitepackages = False # NOTE: Avoid false positives by not skipping missing interpreters. skip_missing_interpreters = False -# NOTES: -# * We avoid the new dependency resolver by pinning pip < 20.3, see -# https://github.com/pypa/pip/issues/9187 -# * Pinning dependencies requires tox >= 3.2.0, see -# https://tox.readthedocs.io/en/latest/config.html#conf-requires -# * It is also necessary to pin virtualenv as a newer virtualenv would still -# lead to fetching the latest pip in the func* tox targets, see -# https://stackoverflow.com/a/38133283 -requires = - pip < 20.3 - virtualenv < 20.0 - setuptools<50.0.0 - tox < 4.0.0 - -# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci -minversion = 3.18.0 [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 TERM=linux - LAYER_PATH={toxinidir}/layers - INTERFACE_PATH={toxinidir}/interfaces + CHARM_LAYERS_DIR={toxinidir}/layers + CHARM_INTERFACES_DIR={toxinidir}/interfaces JUJU_REPOSITORY={toxinidir}/build -passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY -install_command = - {toxinidir}/pip.sh install {opts} {packages} +passenv = + no_proxy + http_proxy + https_proxy + CHARM_INTERFACES_DIR + CHARM_LAYERS_DIR + JUJU_REPOSITORY allowlist_externals = charmcraft bash tox - rename.sh + {toxinidir}/rename.sh deps = -r{toxinidir}/requirements.txt [testenv:build] basepython = python3 -deps = -r{toxinidir}/build-requirements.txt commands = charmcraft clean charmcraft -v pack @@ -57,7 +43,7 @@ commands = [testenv:build-reactive] basepython = python3 commands = - charm-build --log-level DEBUG --use-lock-file-branches -o {toxinidir}/build/builds src {posargs} + charm-build --log-level DEBUG --use-lock-file-branches --binary-wheels-from-source -o {toxinidir}/build/builds src {posargs} [testenv:add-build-lock-file] basepython = python3 @@ -66,32 +52,16 @@ commands = [testenv:py3] basepython = python3 -deps = -r{toxinidir}/test-requirements.txt +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -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 -deps = -r{toxinidir}/test-requirements.txt +[testenv:py310] +basepython = python3.10 +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:pep8]