From f6d4beeda6d4cb0f05e935ae87d1d77bb07e3b20 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Tue, 2 Jun 2026 21:44:00 +0000 Subject: [PATCH] Fix #2503: point DB charm CI at the moved mysql-operators repo The canonical/mysql-operator and canonical/mysql-k8s-operator charms have been merged into canonical/mysql-operators with machines/ and kubernetes/ subdirectories (same layout as canonical/mysql-router-operators). - db-charm-tests.yaml: add `charm-root` to the matrix entries so the checkout, dependency patch, and tox unit run all happen inside the charm's subdirectory; replace the two old mysql repos with two canonical/mysql-operators entries (machines, kubernetes) at the current 8.4/edge tip. - update-published-charms-tests-workflow.py: SKIP mysql-operators (handled by db-charm-tests.yaml) instead of the obsolete mysql-operator / mysql-k8s-operator names, and record the machines/kubernetes layout in CHARM_ROOTS. --- .../update-published-charms-tests-workflow.py | 4 ++-- .github/workflows/db-charm-tests.yaml | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/update-published-charms-tests-workflow.py b/.github/update-published-charms-tests-workflow.py index f7b76edc9..e2371ed8e 100755 --- a/.github/update-published-charms-tests-workflow.py +++ b/.github/update-published-charms-tests-workflow.py @@ -48,8 +48,7 @@ # Handled by db-charm-tests.yaml 'postgresql-operator', 'postgresql-k8s-operator', - 'mysql-operator', - 'mysql-k8s-operator', + 'mysql-operators', # Handled by hello-charm-tests.yaml 'hello-kubecon', # Not in the canonical org anyway (jnsgruk). 'hello-juju-charm', # Not in the canonical org anyway (juju). @@ -94,6 +93,7 @@ 'charms/kfp-viewer', 'charms/kfp-viz', ], + 'mysql-operators': ['machines', 'kubernetes'], 'mysql-router-operators': ['machines', 'kubernetes'], 'notebook-operators': ['charms/jupyter-controller', 'charms/jupyter-ui'], 'tempo-operators': ['coordinator', 'worker'], diff --git a/.github/workflows/db-charm-tests.yaml b/.github/workflows/db-charm-tests.yaml index 865ad4b8b..2b0e0475d 100644 --- a/.github/workflows/db-charm-tests.yaml +++ b/.github/workflows/db-charm-tests.yaml @@ -22,18 +22,23 @@ jobs: matrix: include: - charm-repo: canonical/postgresql-operator + charm-root: . commit: cdaffd23a2a50efb7ff0c7e1ffb70d85da526505 # 2026-05-24T21:43:47Z - charm-repo: canonical/postgresql-k8s-operator + charm-root: . commit: c434df80953409f290e7ea6e76f78a3ec46cecc2 # 2026-05-30T03:35:40Z - - charm-repo: canonical/mysql-operator - commit: 8b73ff31c76ab3234acd4e4172b0347073def2fa # 2026-01-20T15:34:11Z - - charm-repo: canonical/mysql-k8s-operator - commit: 0088c9583f63999ff37d982948e47b9e3e3fba2a # 2026-01-20T15:48:23Z + - charm-repo: canonical/mysql-operators + charm-root: machines + commit: 5f41a556c5252468c7f720343c0bd72e4385ef8b # 2026-06-02T07:35:20Z + - charm-repo: canonical/mysql-operators + charm-root: kubernetes + commit: 5f41a556c5252468c7f720343c0bd72e4385ef8b # 2026-06-02T07:35:20Z steps: - name: Checkout the ${{ matrix.charm-repo }} repository uses: actions/checkout@v6 with: repository: ${{ matrix.charm-repo }} + path: charm-repo persist-credentials: false ref: ${{ matrix.commit }} @@ -47,9 +52,10 @@ jobs: run: pip install poetry~=2.0 - name: Update 'ops' dependency in test charm to latest + working-directory: charm-repo/${{ matrix.charm-root }} run: | - ops_wheel="$(ls operator-wheels/ops-[0-9]*.whl)" - ops_tracing_wheel="$(ls operator-wheels/ops_tracing-*.whl)" + ops_wheel="$(ls "$GITHUB_WORKSPACE"/operator-wheels/ops-[0-9]*.whl)" + ops_tracing_wheel="$(ls "$GITHUB_WORKSPACE"/operator-wheels/ops_tracing-*.whl)" if [ -e "requirements.txt" ]; then sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" requirements.txt echo -e "\n${ops_wheel}" >> requirements.txt @@ -76,4 +82,5 @@ jobs: run: pip install tox~=4.2 - name: Run the charm's unit tests + working-directory: charm-repo/${{ matrix.charm-root }} run: tox -vve unit