From 868bce8e2494c9e9a7724f5d5cc0c124917bbdf8 Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Wed, 8 Jan 2025 10:23:41 +0100 Subject: [PATCH 1/8] fix build on application charm --- .../application-charm/charmcraft.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml b/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml index 368ce3cb2..f48ac4b9c 100644 --- a/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml +++ b/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml @@ -4,10 +4,8 @@ type: charm platforms: ubuntu@22.04:amd64: -# bases: -# - build-on: -# - name: "ubuntu" -# channel: "22.04" -# run-on: -# - name: "ubuntu" -# channel: "22.04" + +parts: + my-charm: + source: . + plugin: charm From 75d55bae683b5b8d443fc3fe53c217799d4062c2 Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Thu, 9 Jan 2025 10:42:01 +0100 Subject: [PATCH 2/8] pin 22.04 --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 36457a84e..96484deaa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,7 @@ jobs: unit-test: name: Unit test charm - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 10 steps: - name: Checkout @@ -33,7 +33,7 @@ jobs: run: tox run -e unit promtool: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout repo uses: actions/checkout@v4 @@ -52,7 +52,7 @@ jobs: terraform-test: name: Terraform - Lint and Simple Deployment - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 120 steps: - name: Checkout repo @@ -110,7 +110,7 @@ jobs: lib-check: name: Check libraries - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 5 steps: - name: Checkout From 40384a61d1c50be7dbcae4a4f838d22489260141 Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Thu, 9 Jan 2025 12:58:55 +0100 Subject: [PATCH 3/8] disable 24.04 build --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- charmcraft.yaml | 3 ++- poetry.lock | 11 +++-------- pyproject.toml | 4 +--- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 96484deaa..d9c28ffe3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -136,7 +136,7 @@ jobs: path: - . - ./tests/integration/relations/opensearch_provider/application-charm/ - uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@beta-charmcraftst124 + uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v24.0.6 with: path-to-charm-directory: ${{ matrix.path }} cache: false diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1f4265fe1..3a20a0081 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,13 +34,13 @@ jobs: build: name: Build charm - uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@beta-charmcraftst124 + uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v24.0.6 release: name: Release charm needs: - build - uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@beta-charmcraftst124 + uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v24.0.6 with: channel: 2/edge artifact-prefix: ${{ needs.build.outputs.artifact-prefix }} diff --git a/charmcraft.yaml b/charmcraft.yaml index 3455ba0ce..f23481d0f 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -13,7 +13,8 @@ type: charm # maintenance & tooling) platforms: ubuntu@22.04:amd64: - ubuntu@24.04:amd64: + # TODO: enable after charmcraft 3 migration + # ubuntu@24.04:amd64: parts: files: plugin: dump diff --git a/poetry.lock b/poetry.lock index 8b3a6d8de..900c3d7b2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1821,8 +1821,8 @@ pyyaml = "*" [package.source] type = "git" url = "https://github.com/canonical/data-platform-workflows" -reference = "beta-charmcraftst124" -resolved_reference = "21e4258d2aa93cd666dbd50f7c8b965e490bb51a" +reference = "v24.0.6" +resolved_reference = "11c673f692893a15d15ee63469420e91f91f8a95" subdirectory = "python/pytest_plugins/pytest_operator_cache" [[package]] @@ -2174,7 +2174,6 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f66efbc1caa63c088dead1c4170d148eabc9b80d95fb75b6c92ac0aad2437d76"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:22353049ba4181685023b25b5b51a574bce33e7f51c759371a7422dcae5402a6"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:932205970b9f9991b34f55136be327501903f7c66830e9760a8ffb15b07f05cd"}, - {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a52d48f4e7bf9005e8f0a89209bf9a73f7190ddf0489eee5eb51377385f59f2a"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-win32.whl", hash = "sha256:3eac5a91891ceb88138c113f9db04f3cebdae277f5d44eaa3651a4f573e6a5da"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-win_amd64.whl", hash = "sha256:ab007f2f5a87bd08ab1499bdf96f3d5c6ad4dcfa364884cb4549aa0154b13a28"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:4a6679521a58256a90b0d89e03992c15144c5f3858f40d7c18886023d7943db6"}, @@ -2183,7 +2182,6 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:811ea1594b8a0fb466172c384267a4e5e367298af6b228931f273b111f17ef52"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cf12567a7b565cbf65d438dec6cfbe2917d3c1bdddfce84a9930b7d35ea59642"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7dd5adc8b930b12c8fc5b99e2d535a09889941aa0d0bd06f4749e9a9397c71d2"}, - {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1492a6051dab8d912fc2adeef0e8c72216b24d57bd896ea607cb90bb0c4981d3"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-win32.whl", hash = "sha256:bd0a08f0bab19093c54e18a14a10b4322e1eacc5217056f3c063bd2f59853ce4"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-win_amd64.whl", hash = "sha256:a274fb2cb086c7a3dea4322ec27f4cb5cc4b6298adb583ab0e211a4682f241eb"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:20b0f8dc160ba83b6dcc0e256846e1a02d044e13f7ea74a3d1d56ede4e48c632"}, @@ -2192,7 +2190,6 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:749c16fcc4a2b09f28843cda5a193e0283e47454b63ec4b81eaa2242f50e4ccd"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bf165fef1f223beae7333275156ab2022cffe255dcc51c27f066b4370da81e31"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:32621c177bbf782ca5a18ba4d7af0f1082a3f6e517ac2a18b3974d4edf349680"}, - {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b82a7c94a498853aa0b272fd5bc67f29008da798d4f93a2f9f289feb8426a58d"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-win32.whl", hash = "sha256:e8c4ebfcfd57177b572e2040777b8abc537cdef58a2120e830124946aa9b42c5"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-win_amd64.whl", hash = "sha256:0467c5965282c62203273b838ae77c0d29d7638c8a4e3a1c8bdd3602c10904e4"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:4c8c5d82f50bb53986a5e02d1b3092b03622c02c2eb78e29bec33fd9593bae1a"}, @@ -2201,7 +2198,6 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96777d473c05ee3e5e3c3e999f5d23c6f4ec5b0c38c098b3a5229085f74236c6"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:3bc2a80e6420ca8b7d3590791e2dfc709c88ab9152c00eeb511c9875ce5778bf"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e188d2699864c11c36cdfdada94d781fd5d6b0071cd9c427bceb08ad3d7c70e1"}, - {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f6f3eac23941b32afccc23081e1f50612bdbe4e982012ef4f5797986828cd01"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-win32.whl", hash = "sha256:6442cb36270b3afb1b4951f060eccca1ce49f3d087ca1ca4563a6eb479cb3de6"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-win_amd64.whl", hash = "sha256:e5b8daf27af0b90da7bb903a876477a9e6d7270be6146906b276605997c7e9a3"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:fc4b630cd3fa2cf7fce38afa91d7cfe844a9f75d7f0f36393fa98815e911d987"}, @@ -2210,7 +2206,6 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2f1c3765db32be59d18ab3953f43ab62a761327aafc1594a2a1fbe038b8b8a7"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d85252669dc32f98ebcd5d36768f5d4faeaeaa2d655ac0473be490ecdae3c285"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e143ada795c341b56de9418c58d028989093ee611aa27ffb9b7f609c00d813ed"}, - {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2c59aa6170b990d8d2719323e628aaf36f3bfbc1c26279c0eeeb24d05d2d11c7"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-win32.whl", hash = "sha256:beffaed67936fbbeffd10966a4eb53c402fafd3d6833770516bf7314bc6ffa12"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-win_amd64.whl", hash = "sha256:040ae85536960525ea62868b642bdb0c2cc6021c9f9d507810c0c604e66f5a7b"}, {file = "ruamel.yaml.clib-0.2.12.tar.gz", hash = "sha256:6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f"}, @@ -2571,4 +2566,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "3d01a9620473ac93567336467ce193e57dcd350fd1d4896d45839391dd6b99ed" +content-hash = "cc83644ac47046737c470133ae51ea8f5ec0ba8cfc8b6e8582141a7ed0ae6ac0" diff --git a/pyproject.toml b/pyproject.toml index 7ee430aa0..450f997ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,11 +71,9 @@ pytest = "^8.2.2" pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v24.0.6", subdirectory = "python/pytest_plugins/github_secrets"} pytest-asyncio = "^0.21.2" pytest-operator = "^0.35.0" -pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", branch = "beta-charmcraftst124", subdirectory = "python/pytest_plugins/pytest_operator_cache"} +pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v24.0.6", subdirectory = "python/pytest_plugins/pytest_operator_cache"} pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v24.0.6", subdirectory = "python/pytest_plugins/pytest_operator_groups"} pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v24.0.6", subdirectory = "python/pytest_plugins/microceph"} -# should not be updated unless https://github.com/juju/python-libjuju/issues/1093 is fixed -# websockets issue solved from 3.2.5.1 https://github.com/juju/python-libjuju/issues/1184 # TODO: restore to 3.5.0 juju = "==3.6.0" ops = "^2.15" tenacity = "^8.4.2" From c9050f748c953fa2b0f83b9838b6cd72da259805 Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Thu, 9 Jan 2025 13:00:10 +0100 Subject: [PATCH 4/8] reenable cache --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d9c28ffe3..5cda55ff6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -139,8 +139,7 @@ jobs: uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v24.0.6 with: path-to-charm-directory: ${{ matrix.path }} - cache: false - # charmcraft-snap-revision: 5303 + cache: true integration-test: strategy: From a37a98582e2af99f032a7bb1faec22231fc6a106 Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Thu, 9 Jan 2025 13:06:33 +0100 Subject: [PATCH 5/8] switch to old syntax --- charmcraft.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/charmcraft.yaml b/charmcraft.yaml index f23481d0f..5fd54674b 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -11,10 +11,18 @@ type: charm # (ST124 syntax is needed to enable multi-base charms with Ubuntu 24.04. We use ST124 syntax across # all of our charms [even those that aren't multi base] for consistency and to simplify CI/CD # maintenance & tooling) -platforms: - ubuntu@22.04:amd64: - # TODO: enable after charmcraft 3 migration - # ubuntu@24.04:amd64: +# platforms: +# ubuntu@22.04:amd64: +# # TODO: enable after charmcraft 3 migration +# ubuntu@24.04:amd64: +bases: + - build-on: + - name: "ubuntu" + channel: "22.04" + run-on: + - name: "ubuntu" + channel: "22.04" + parts: files: plugin: dump From 64c5d0ae20681fd7074f475b1bad157cdbd4bafe Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Thu, 9 Jan 2025 13:08:45 +0100 Subject: [PATCH 6/8] switch to old syntax on application charm --- charmcraft.yaml | 3 --- .../application-charm/charmcraft.yaml | 13 ++++++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/charmcraft.yaml b/charmcraft.yaml index 5fd54674b..023889439 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -2,9 +2,6 @@ # See LICENSE file for licensing details. type: charm -# base: ubuntu@22.04 -# platforms: -# amd64: # Use upcoming ST124 syntax # To pack this charm, a temporary compatibility wrapper https://github.com/canonical/charmcraftst124 # is required until ST124 support is added to charmcraft diff --git a/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml b/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml index f48ac4b9c..b43a6df9c 100644 --- a/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml +++ b/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml @@ -1,9 +1,16 @@ # Copyright 2024 Canonical Ltd. # See LICENSE file for licensing details. -type: charm -platforms: - ubuntu@22.04:amd64: + +# platforms: +# ubuntu@22.04:amd64: +bases: + - build-on: + - name: "ubuntu" + channel: "22.04" + run-on: + - name: "ubuntu" + channel: "22.04" parts: my-charm: From abb9b353511b08893d2f827311e92ecd4deac82f Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Thu, 9 Jan 2025 13:09:50 +0100 Subject: [PATCH 7/8] fix --- .../opensearch_provider/application-charm/charmcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml b/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml index b43a6df9c..058c842df 100644 --- a/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml +++ b/tests/integration/relations/opensearch_provider/application-charm/charmcraft.yaml @@ -1,7 +1,7 @@ # Copyright 2024 Canonical Ltd. # See LICENSE file for licensing details. - +type: charm # platforms: # ubuntu@22.04:amd64: bases: From 2c1eb3a26b159635728962a6646d3416f3431744 Mon Sep 17 00:00:00 2001 From: Raul Zamora Date: Thu, 9 Jan 2025 13:38:53 +0100 Subject: [PATCH 8/8] remove cached build --- .github/workflows/ci.yaml | 2 +- charmcraft-24.04.patch | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 charmcraft-24.04.patch diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5cda55ff6..0b6949455 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -139,7 +139,7 @@ jobs: uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v24.0.6 with: path-to-charm-directory: ${{ matrix.path }} - cache: true + cache: false integration-test: strategy: diff --git a/charmcraft-24.04.patch b/charmcraft-24.04.patch deleted file mode 100644 index 99d791209..000000000 --- a/charmcraft-24.04.patch +++ /dev/null @@ -1,9 +0,0 @@ -@@ -2,7 +2,7 @@ - # See LICENSE file for licensing details. - - type: charm --base: ubuntu@24.04 -+base: ubuntu@22.04 - platforms: - amd64: - parts: