From ceb32560841fa9e9897f952e389544d20c7f0408 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Wed, 3 Sep 2025 15:43:18 +0800 Subject: [PATCH 01/24] Use CI runners for integration tests --- .github/workflows/integration_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 649d47df23..4566c7d97d 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -23,7 +23,7 @@ jobs: modules: '["test_charm_metrics_failure", "test_charm_metrics_success", "test_charm_fork_repo", "test_charm_fork_path_change", "test_charm_no_runner", "test_charm_runner", "test_debug_ssh", "test_charm_upgrade", "test_reactive", "test_jobmanager_prespawned", "test_jobmanager_reactive"]' extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' self-hosted-runner: true - self-hosted-runner-label: stg-private-endpoint + self-hosted-runner-label: self-hosted-linux-amd64-noble-pfe-ci openstack-integration-tests-cross-controller-private-endpoint: name: Cross controller integration test using private-endpoint uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main @@ -36,7 +36,7 @@ jobs: modules: '["test_prometheus_metrics"]' extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' self-hosted-runner: true - self-hosted-runner-label: stg-private-endpoint + self-hosted-runner-label: self-hosted-linux-amd64-noble-pfe-ci allure-report: if: ${{ (success() || failure()) && github.event_name == 'schedule' }} needs: From 0e09875d7551be97f7c48825ba8101b4754c16dd Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Wed, 3 Sep 2025 15:55:02 +0800 Subject: [PATCH 02/24] Change end 2 end test to use pfe-ci runners --- .github/workflows/e2e_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e_test.yaml b/.github/workflows/e2e_test.yaml index ca84e62bae..3cf5b688bb 100644 --- a/.github/workflows/e2e_test.yaml +++ b/.github/workflows/e2e_test.yaml @@ -21,7 +21,7 @@ jobs: modules: '["test_e2e"]' extra-arguments: "-m openstack" self-hosted-runner: true - self-hosted-runner-label: stg-private-endpoint + self-hosted-runner-label: pfe-ci required_status_checks: name: Required E2E Test Status Checks From 98fd6a302751d2cd2e8e527d15d3be8c6702f135 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Thu, 4 Sep 2025 09:51:54 +0800 Subject: [PATCH 03/24] Update the microk8s version --- tests/integration/setup-integration-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/setup-integration-tests.sh b/tests/integration/setup-integration-tests.sh index c905cf305b..fcf5cf54c8 100755 --- a/tests/integration/setup-integration-tests.sh +++ b/tests/integration/setup-integration-tests.sh @@ -12,7 +12,7 @@ ORIGINAL_CONTROLLER=$(juju controllers --format json | jq -r '.controllers | keys | .[0]') echo "bootstrapping microk8s juju controller" -sudo snap install microk8s --channel=1.32-strict/stable +sudo snap install microk8s --channel=1.34-strict/stable GROUP=snap_microk8s sudo usermod -a -G "$GROUP" "$USER" if [ "$(id -gn)" != "$GROUP" ]; then From 41524ecf25df5e65b5dd2bd1a3c035d516a0446a Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Thu, 4 Sep 2025 12:33:42 +0800 Subject: [PATCH 04/24] Use tmp integration tests args for now --- .github/workflows/integration_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 4566c7d97d..31f33f1b9d 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -14,7 +14,7 @@ concurrency: jobs: openstack-integration-tests-private-endpoint: name: Integration test using private-endpoint - uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main + uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@tmp-integration-test-args secrets: inherit with: juju-channel: 3.6/stable @@ -26,7 +26,7 @@ jobs: self-hosted-runner-label: self-hosted-linux-amd64-noble-pfe-ci openstack-integration-tests-cross-controller-private-endpoint: name: Cross controller integration test using private-endpoint - uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main + uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@tmp-integration-test-args secrets: inherit with: juju-channel: 3.6/stable From b84fd3d86e43affb1a2a17a08c069511e58075c0 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Thu, 4 Sep 2025 14:00:28 +0800 Subject: [PATCH 05/24] Test pfe-ci runners --- .github/workflows/integration_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 31f33f1b9d..674de2f49d 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -23,7 +23,7 @@ jobs: modules: '["test_charm_metrics_failure", "test_charm_metrics_success", "test_charm_fork_repo", "test_charm_fork_path_change", "test_charm_no_runner", "test_charm_runner", "test_debug_ssh", "test_charm_upgrade", "test_reactive", "test_jobmanager_prespawned", "test_jobmanager_reactive"]' extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' self-hosted-runner: true - self-hosted-runner-label: self-hosted-linux-amd64-noble-pfe-ci + self-hosted-runner-label: pfe-ci openstack-integration-tests-cross-controller-private-endpoint: name: Cross controller integration test using private-endpoint uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@tmp-integration-test-args @@ -36,7 +36,7 @@ jobs: modules: '["test_prometheus_metrics"]' extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' self-hosted-runner: true - self-hosted-runner-label: self-hosted-linux-amd64-noble-pfe-ci + self-hosted-runner-label: pfe-ci allure-report: if: ${{ (success() || failure()) && github.event_name == 'schedule' }} needs: From b0f00c80bfcb48e9337fbe3726e01dea67418d1f Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Mon, 8 Sep 2025 13:35:21 +0800 Subject: [PATCH 06/24] Disable some workflow during testing --- .github/workflows/e2e_test.yaml | 5 ++++- .github/workflows/integration_test.yaml | 4 +++- .github/workflows/test.yaml | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e_test.yaml b/.github/workflows/e2e_test.yaml index 3cf5b688bb..b847ee0218 100644 --- a/.github/workflows/e2e_test.yaml +++ b/.github/workflows/e2e_test.yaml @@ -1,7 +1,10 @@ name: End-to-End tests on: - pull_request: + # TODO: tmp disable for testing. + # pull_request: + workflow_dispatch: + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 674de2f49d..7b62904789 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -20,7 +20,9 @@ jobs: juju-channel: 3.6/stable provider: lxd test-tox-env: integration-juju3.6 - modules: '["test_charm_metrics_failure", "test_charm_metrics_success", "test_charm_fork_repo", "test_charm_fork_path_change", "test_charm_no_runner", "test_charm_runner", "test_debug_ssh", "test_charm_upgrade", "test_reactive", "test_jobmanager_prespawned", "test_jobmanager_reactive"]' + modules: '["test_charm_no_runner"]' + # TODO: temp disable + # modules: '["test_charm_metrics_failure", "test_charm_metrics_success", "test_charm_fork_repo", "test_charm_fork_path_change", "test_charm_no_runner", "test_charm_runner", "test_debug_ssh", "test_charm_upgrade", "test_reactive", "test_jobmanager_prespawned", "test_jobmanager_reactive"]' extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' self-hosted-runner: true self-hosted-runner-label: pfe-ci diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c88ff8b1f4..210b1fe60d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,7 +1,9 @@ name: Tests on: - pull_request: + # TODO: tmp disable for testing. + # pull_request: + workflow_dispatch: jobs: unit-tests: From 2476ad10472f0d22585833a66de7dfe4d244a45e Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Tue, 9 Sep 2025 10:14:03 +0800 Subject: [PATCH 07/24] Debug --- .github/workflows/integration_test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 7b62904789..79996d2ca6 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -26,6 +26,8 @@ jobs: extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' self-hosted-runner: true self-hosted-runner-label: pfe-ci + tmate-debug: true + tmate-timeout: 3000 openstack-integration-tests-cross-controller-private-endpoint: name: Cross controller integration test using private-endpoint uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@tmp-integration-test-args From f5c675da0962fd75a100cbb7e24ffe542eff5537 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Tue, 9 Sep 2025 15:05:53 +0800 Subject: [PATCH 08/24] Debug --- .github/workflows/integration_test.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 79996d2ca6..c305d45c85 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -41,9 +41,10 @@ jobs: extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' self-hosted-runner: true self-hosted-runner-label: pfe-ci - allure-report: - if: ${{ (success() || failure()) && github.event_name == 'schedule' }} - needs: - - openstack-integration-tests-private-endpoint - - openstack-integration-tests-cross-controller-private-endpoint - uses: canonical/operator-workflows/.github/workflows/allure_report.yaml@main + # TODO: disable for debugging + # allure-report: + # if: ${{ (success() || failure()) && github.event_name == 'schedule' }} + # needs: + # - openstack-integration-tests-private-endpoint + # - openstack-integration-tests-cross-controller-private-endpoint + # uses: canonical/operator-workflows/.github/workflows/allure_report.yaml@main From 9381880013382daa41425cfc07f2e8eff8dc4887 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Tue, 9 Sep 2025 15:54:20 +0800 Subject: [PATCH 09/24] Debug --- .github/workflows/integration_test.yaml | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index c305d45c85..e28af33389 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -28,20 +28,20 @@ jobs: self-hosted-runner-label: pfe-ci tmate-debug: true tmate-timeout: 3000 - openstack-integration-tests-cross-controller-private-endpoint: - name: Cross controller integration test using private-endpoint - uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@tmp-integration-test-args - secrets: inherit - with: - juju-channel: 3.6/stable - pre-run-script: tests/integration/setup-integration-tests.sh - provider: lxd - test-tox-env: integration-juju3.6 - modules: '["test_prometheus_metrics"]' - extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' - self-hosted-runner: true - self-hosted-runner-label: pfe-ci # TODO: disable for debugging + # openstack-integration-tests-cross-controller-private-endpoint: + # name: Cross controller integration test using private-endpoint + # uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@tmp-integration-test-args + # secrets: inherit + # with: + # juju-channel: 3.6/stable + # pre-run-script: tests/integration/setup-integration-tests.sh + # provider: lxd + # test-tox-env: integration-juju3.6 + # modules: '["test_prometheus_metrics"]' + # extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' + # self-hosted-runner: true + # self-hosted-runner-label: pfe-ci # allure-report: # if: ${{ (success() || failure()) && github.event_name == 'schedule' }} # needs: From c803eb084c0b72064d4029f1a450a1e82e03597d Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Tue, 9 Sep 2025 16:41:51 +0800 Subject: [PATCH 10/24] Debug --- .github/workflows/integration_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index e28af33389..86f6a9b45f 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -21,7 +21,7 @@ jobs: provider: lxd test-tox-env: integration-juju3.6 modules: '["test_charm_no_runner"]' - # TODO: temp disable + # TODO: disable for debugging # modules: '["test_charm_metrics_failure", "test_charm_metrics_success", "test_charm_fork_repo", "test_charm_fork_path_change", "test_charm_no_runner", "test_charm_runner", "test_debug_ssh", "test_charm_upgrade", "test_reactive", "test_jobmanager_prespawned", "test_jobmanager_reactive"]' extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' self-hosted-runner: true From 1778af30f7940159b00d37b8d2a45afcf94607b2 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Fri, 12 Sep 2025 09:40:11 +0800 Subject: [PATCH 11/24] Using a temp fix branch of image builder --- tests/integration/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index a9436a0259..2d2c4b800d 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -419,7 +419,8 @@ async def image_builder_fixture( app = await model.deploy( "github-runner-image-builder", application_name=application_name, - channel="latest/edge", + # TODO: Temp switch to a fix branch + channel="latest/edge/snap-install-proxy-fix", config=image_builder_config, ) else: From a07bd753c2eac6fb0a5a5e6fb26f0b12a2493408 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Fri, 12 Sep 2025 10:57:19 +0800 Subject: [PATCH 12/24] Test with image builder revision 111 --- tests/integration/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 2d2c4b800d..0e42f5dd80 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -419,8 +419,9 @@ async def image_builder_fixture( app = await model.deploy( "github-runner-image-builder", application_name=application_name, - # TODO: Temp switch to a fix branch - channel="latest/edge/snap-install-proxy-fix", + channel="latest/edge", + # TODO: Temp switch to a fix revision + revision="111", config=image_builder_config, ) else: From eb5804ff79bfe0a0f012a3e22e930fdbedb0c2f8 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Fri, 12 Sep 2025 11:25:58 +0800 Subject: [PATCH 13/24] Fix revision arg in integration test --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 0e42f5dd80..029c7e4f5a 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision="111", + revision=111, config=image_builder_config, ) else: From fd3acce77ed985bbb61d9df09e62dc252469181e Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Fri, 12 Sep 2025 13:06:45 +0800 Subject: [PATCH 14/24] Change the test image builder revision --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 029c7e4f5a..d15178330b 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=111, + revision=112, config=image_builder_config, ) else: From 6c43ca022cb00b04363a4fd4f5babb0f5f84968e Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Fri, 12 Sep 2025 14:03:02 +0800 Subject: [PATCH 15/24] Update the image builder fix --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index d15178330b..140d6adc21 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=112, + revision=113, config=image_builder_config, ) else: From 422da6ee690f954471ed32398f89a0c42fa8e57c Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Fri, 12 Sep 2025 15:58:04 +0800 Subject: [PATCH 16/24] Try fix for the image building proxy config --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 140d6adc21..6e0c413911 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=113, + revision=114, config=image_builder_config, ) else: From 6dc69d990cd0a57ca54af493547971330330a3b5 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Fri, 12 Sep 2025 19:39:30 +0800 Subject: [PATCH 17/24] Test image builder fix --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 6e0c413911..e41ecb8e7a 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=114, + revision=115, config=image_builder_config, ) else: From b1f7e6680c9ae094f5f6cd6227d452d7bfb3e3f1 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Mon, 15 Sep 2025 09:43:22 +0800 Subject: [PATCH 18/24] Test new version of image builder --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index e41ecb8e7a..3bed3e1b96 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=115, + revision=116, config=image_builder_config, ) else: From 815fac9bae62b39bedfa0d587bf9d75b27005767 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Mon, 15 Sep 2025 10:43:18 +0800 Subject: [PATCH 19/24] Fix image builder --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 3bed3e1b96..3fa9719fb7 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=116, + revision=117, config=image_builder_config, ) else: From f97cc5034d0a7b29bc0fbbbda2db69153b491c14 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Mon, 15 Sep 2025 11:38:20 +0800 Subject: [PATCH 20/24] Try temp fix --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 3fa9719fb7..752bad1fb9 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=117, + revision=118, config=image_builder_config, ) else: From 8428dfa0c689dc354e1ed6d7b3207d0aec968852 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Mon, 15 Sep 2025 13:28:03 +0800 Subject: [PATCH 21/24] test --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 752bad1fb9..cac6dadc4a 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=118, + revision=119, config=image_builder_config, ) else: From ddf88c8db3d814ef2036089478978a0a3cc92813 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Mon, 15 Sep 2025 15:38:44 +0800 Subject: [PATCH 22/24] Test fix with rebuild --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index cac6dadc4a..26a57ee79f 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -421,7 +421,7 @@ async def image_builder_fixture( application_name=application_name, channel="latest/edge", # TODO: Temp switch to a fix revision - revision=119, + revision=120, config=image_builder_config, ) else: From 7cc8d2c964af8db58851eab4ad5ccc1b0220a241 Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Mon, 22 Sep 2025 14:29:27 +0800 Subject: [PATCH 23/24] Trigger workflow --- .github/workflows/integration_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 86f6a9b45f..0449fb092d 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -28,7 +28,7 @@ jobs: self-hosted-runner-label: pfe-ci tmate-debug: true tmate-timeout: 3000 - # TODO: disable for debugging + # TODO: re-enable # openstack-integration-tests-cross-controller-private-endpoint: # name: Cross controller integration test using private-endpoint # uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@tmp-integration-test-args From 6aa4882b437d9a0cf0b08fd91c40fa6a7d4ff37e Mon Sep 17 00:00:00 2001 From: yhaliaw Date: Mon, 22 Sep 2025 16:27:55 +0800 Subject: [PATCH 24/24] Test --- .github/workflows/integration_test.yaml | 2 +- tests/integration/requirements.txt | 3 +++ tests/integration/test_tmp.py | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/integration/test_tmp.py diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 0449fb092d..226d48644b 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -20,7 +20,7 @@ jobs: juju-channel: 3.6/stable provider: lxd test-tox-env: integration-juju3.6 - modules: '["test_charm_no_runner"]' + modules: '["test_tmp"]' # TODO: disable for debugging # modules: '["test_charm_metrics_failure", "test_charm_metrics_success", "test_charm_fork_repo", "test_charm_fork_path_change", "test_charm_no_runner", "test_charm_runner", "test_debug_ssh", "test_charm_upgrade", "test_reactive", "test_jobmanager_prespawned", "test_jobmanager_reactive"]' extra-arguments: '-m openstack --log-format="%(asctime)s %(levelname)s %(message)s"' diff --git a/tests/integration/requirements.txt b/tests/integration/requirements.txt index 062f66c0ba..d489f228c3 100644 --- a/tests/integration/requirements.txt +++ b/tests/integration/requirements.txt @@ -4,3 +4,6 @@ kombu==5.* pygithub pymongo==4.* tenacity==9.1.2 +# TODO: Remove +openstacksdk==4.5.0 +requests==2.32.5 diff --git a/tests/integration/test_tmp.py b/tests/integration/test_tmp.py new file mode 100644 index 0000000000..2ccba8a184 --- /dev/null +++ b/tests/integration/test_tmp.py @@ -0,0 +1,23 @@ +import requests +from openstack.connection import Connection + +def test_openstack(openstack_connection: Connection): + output_filename = "test.image" + + request = requests.get( + "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img", + timeout=60 * 20, + stream=True, + ) # nosec: B310, B113 + + with open(output_filename, "wb") as file: + for chunk in request.iter_content(1024 * 1024): # 1 MB chunks + file.write(chunk) + + openstack_connection.create_image( + name="tmp_test", + filename=output_filename, + properties={"architecture": "amd64"}, + allow_duplicates=True, + wait=True, + )