From e328e565cf6205a989bc69e367884c5919f570f2 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Fri, 21 Nov 2025 14:19:55 -0500 Subject: [PATCH 1/9] fix: Cleanup TF docs and tests after cutting track/2 --- docs/how-to/cos-tls.tf | 4 +- .../cos-canonical-k8s-sandbox.conf | 4 +- .../installation/cos-lite-microk8s-sandbox.tf | 4 +- .../test_upgrade_cos_tls_external.py | 18 +++++ tests/integration/cos/tls_external/track-2.tf | 4 +- .../integration/cos/tls_external/track-dev.tf | 65 +++++++++++++++++++ .../cos/tls_full/test_upgrade_cos_tls_full.py | 18 +++++ tests/integration/cos/tls_full/track-2.tf | 4 +- tests/integration/cos/tls_full/track-dev.tf | 65 +++++++++++++++++++ .../test_upgrade_cos_tls_internal.py | 15 +++++ tests/integration/cos/tls_internal/track-2.tf | 4 +- .../integration/cos/tls_internal/track-dev.tf | 49 ++++++++++++++ .../cos/tls_none/test_upgrade_cos_tls_none.py | 15 +++++ tests/integration/cos/tls_none/track-2.tf | 4 +- tests/integration/cos/tls_none/track-dev.tf | 49 ++++++++++++++ .../test_upgrade_cos_lite_tls_external.py | 11 ++-- .../cos_lite/tls_external/track-2.tf | 4 +- .../tls_external/{track-1.tf => track-dev.tf} | 2 +- .../test_upgrade_cos_lite_tls_full.py | 11 ++-- .../integration/cos_lite/tls_full/track-2.tf | 4 +- .../tls_full/{track-1.tf => track-dev.tf} | 3 +- .../test_upgrade_cos_lite_tls_internal.py | 11 ++-- .../cos_lite/tls_internal/track-2.tf | 4 +- .../tls_internal/{track-1.tf => track-dev.tf} | 2 +- .../test_upgrade_cos_lite_tls_none.py | 11 ++-- .../integration/cos_lite/tls_none/track-2.tf | 4 +- .../tls_none/{track-1.tf => track-dev.tf} | 2 +- 27 files changed, 345 insertions(+), 46 deletions(-) create mode 100644 tests/integration/cos/tls_external/track-dev.tf create mode 100644 tests/integration/cos/tls_full/track-dev.tf create mode 100644 tests/integration/cos/tls_internal/track-dev.tf create mode 100644 tests/integration/cos/tls_none/track-dev.tf rename tests/integration/cos_lite/tls_external/{track-1.tf => track-dev.tf} (95%) rename tests/integration/cos_lite/tls_full/{track-1.tf => track-dev.tf} (95%) rename tests/integration/cos_lite/tls_internal/{track-1.tf => track-dev.tf} (95%) rename tests/integration/cos_lite/tls_none/{track-1.tf => track-dev.tf} (95%) diff --git a/docs/how-to/cos-tls.tf b/docs/how-to/cos-tls.tf index b6330546..5b8d99b1 100644 --- a/docs/how-to/cos-tls.tf +++ b/docs/how-to/cos-tls.tf @@ -4,9 +4,9 @@ resource "juju_model" "cos" { module "cos" { # Use the right source value depending on whether you are using cos or cos-lite - source = "git::https://github.com/canonical/observability-stack//terraform/cos" + source = "git::https://github.com/canonical/observability-stack//terraform/cos?ref=track/2" model_uuid = juju_model.cos.uuid - channel = "1/stable" + channel = "2/stable" internal_tls = true # TLS between in-model applications # Update the _offer_url inputs with the offered endpoints of the external CA's model diff --git a/docs/tutorial/installation/cos-canonical-k8s-sandbox.conf b/docs/tutorial/installation/cos-canonical-k8s-sandbox.conf index 37d1343c..5ef0d901 100644 --- a/docs/tutorial/installation/cos-canonical-k8s-sandbox.conf +++ b/docs/tutorial/installation/cos-canonical-k8s-sandbox.conf @@ -74,9 +74,9 @@ runcmd: } module "cos" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos" + source = "git::https://github.com/canonical/observability-stack//terraform/cos?ref=track/2" model_uuid = juju_model.cos.uuid - channel = "2/edge" + channel = "2/stable" anti_affinity = false internal_tls = false external_certificates_offer_url = null diff --git a/docs/tutorial/installation/cos-lite-microk8s-sandbox.tf b/docs/tutorial/installation/cos-lite-microk8s-sandbox.tf index f75c07ff..c3d1a1b0 100644 --- a/docs/tutorial/installation/cos-lite-microk8s-sandbox.tf +++ b/docs/tutorial/installation/cos-lite-microk8s-sandbox.tf @@ -14,9 +14,9 @@ resource "juju_model" "cos" { } module "cos-lite" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" + source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite?ref=track/2" model_uuid = juju_model.cos.uuid - channel = "1/stable" + channel = "2/stable" ssc = { channel = "1/stable" } traefik = { channel = "latest/edge" } } diff --git a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py index 4db63bad..6d7d72ef 100644 --- a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py +++ b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py @@ -10,12 +10,14 @@ from helpers import ( catalogue_apps_are_reachable, get_tls_context, + refresh_o11y_apps, wait_for_active_idle_without_error, ) import jubilant TRACK_2_TF_FILE = Path(__file__).parent.resolve() / "track-2.tf" +TRACK_DEV_TF_FILE = Path(__file__).parent.resolve() / "track-dev.tf" S3_ENDPOINT = { "s3_endpoint": os.getenv("S3_ENDPOINT"), "s3_secret_key": os.getenv("S3_SECRET_KEY"), @@ -38,3 +40,19 @@ def test_deploy_from_track( wait_for_active_idle_without_error([cos_model], timeout=5400) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") catalogue_apps_are_reachable(cos_model, tls_ctx) + + +def test_deploy_to_track( + tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju +): + # WHEN upgraded to track n + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) + + # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 + refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + + # THEN the model is upgraded and is active/idle + wait_for_active_idle_without_error([ca_model, cos_model]) + tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") + catalogue_apps_are_reachable(cos_model, tls_ctx) diff --git a/tests/integration/cos/tls_external/track-2.tf b/tests/integration/cos/tls_external/track-2.tf index 5c940b27..9766172c 100644 --- a/tests/integration/cos/tls_external/track-2.tf +++ b/tests/integration/cos/tls_external/track-2.tf @@ -44,9 +44,9 @@ module "ssc" { } module "cos" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos" + source = "git::https://github.com/canonical/observability-stack//terraform/cos?ref=track/2" model_uuid = data.juju_model.cos-model.uuid - channel = "2/edge" + channel = "2/stable" internal_tls = "false" external_certificates_offer_url = "admin/${var.ca_model}.certificates" external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert" diff --git a/tests/integration/cos/tls_external/track-dev.tf b/tests/integration/cos/tls_external/track-dev.tf new file mode 100644 index 00000000..b55c8a24 --- /dev/null +++ b/tests/integration/cos/tls_external/track-dev.tf @@ -0,0 +1,65 @@ +terraform { + required_version = ">= 1.5" + required_providers { + juju = { + source = "juju/juju" + version = "~> 1.0" + } + } +} + +variable "cos_model" { + type = string +} + +variable "ca_model" { + type = string +} + +data "juju_model" "ca-model" { + name = var.ca_model + owner = "admin" +} + +data "juju_model" "cos-model" { + name = var.cos_model + owner = "admin" +} + +variable "s3_endpoint" { + type = string +} + +variable "s3_secret_key" { + type = string +} + +variable "s3_access_key" { + type = string +} + +module "ssc" { + source = "git::https://github.com/canonical/self-signed-certificates-operator//terraform" + model_uuid = data.juju_model.ca-model.uuid +} + +module "cos" { + source = "git::https://github.com/canonical/observability-stack//terraform/cos" + model_uuid = data.juju_model.cos-model.uuid + channel = "dev/edge" + internal_tls = "false" + external_certificates_offer_url = "admin/${var.ca_model}.certificates" + external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert" + + s3_endpoint = var.s3_endpoint + s3_secret_key = var.s3_secret_key + s3_access_key = var.s3_access_key + + traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable + loki_coordinator = { units = 1 } + loki_worker = { backend_units = 1, read_units = 1, write_units = 1 } + mimir_coordinator = { units = 1 } + mimir_worker = { backend_units = 1, read_units = 1, write_units = 1 } + tempo_coordinator = { units = 1 } + tempo_worker = { compactor_units = 1, distributor_units = 1, ingester_units = 1, metrics_generator_units = 1, querier_units = 1, query_frontend_units = 1 } +} diff --git a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py index 8a5a651c..05247e73 100644 --- a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py +++ b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py @@ -10,12 +10,14 @@ from helpers import ( catalogue_apps_are_reachable, get_tls_context, + refresh_o11y_apps, wait_for_active_idle_without_error, ) import jubilant TRACK_2_TF_FILE = Path(__file__).parent.resolve() / "track-2.tf" +TRACK_DEV_TF_FILE = Path(__file__).parent.resolve() / "track-dev.tf" S3_ENDPOINT = { "s3_endpoint": os.getenv("S3_ENDPOINT"), "s3_secret_key": os.getenv("S3_SECRET_KEY"), @@ -38,3 +40,19 @@ def test_deploy_from_track( wait_for_active_idle_without_error([cos_model], timeout=5400) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") catalogue_apps_are_reachable(cos_model, tls_ctx) + + +def test_deploy_to_track( + tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju +): + # WHEN upgraded to track n + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) + + # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 + refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + + # THEN the model is upgraded and is active/idle + wait_for_active_idle_without_error([ca_model, cos_model]) + tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") + catalogue_apps_are_reachable(cos_model, tls_ctx) diff --git a/tests/integration/cos/tls_full/track-2.tf b/tests/integration/cos/tls_full/track-2.tf index 6151f22a..ce4b36bd 100644 --- a/tests/integration/cos/tls_full/track-2.tf +++ b/tests/integration/cos/tls_full/track-2.tf @@ -44,9 +44,9 @@ module "ssc" { } module "cos" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos" + source = "git::https://github.com/canonical/observability-stack//terraform/cos?ref=track/2" model_uuid = data.juju_model.cos-model.uuid - channel = "2/edge" + channel = "2/stable" internal_tls = "true" external_certificates_offer_url = "admin/${var.ca_model}.certificates" external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert" diff --git a/tests/integration/cos/tls_full/track-dev.tf b/tests/integration/cos/tls_full/track-dev.tf new file mode 100644 index 00000000..e0ad2d26 --- /dev/null +++ b/tests/integration/cos/tls_full/track-dev.tf @@ -0,0 +1,65 @@ +terraform { + required_version = ">= 1.5" + required_providers { + juju = { + source = "juju/juju" + version = "~> 1.0" + } + } +} + +variable "cos_model" { + type = string +} + +variable "ca_model" { + type = string +} + +data "juju_model" "ca-model" { + name = var.ca_model + owner = "admin" +} + +data "juju_model" "cos-model" { + name = var.cos_model + owner = "admin" +} + +variable "s3_endpoint" { + type = string +} + +variable "s3_secret_key" { + type = string +} + +variable "s3_access_key" { + type = string +} + +module "ssc" { + source = "git::https://github.com/canonical/self-signed-certificates-operator//terraform" + model_uuid = data.juju_model.ca-model.uuid +} + +module "cos" { + source = "git::https://github.com/canonical/observability-stack//terraform/cos" + model_uuid = data.juju_model.cos-model.uuid + channel = "dev/edge" + internal_tls = "true" + external_certificates_offer_url = "admin/${var.ca_model}.certificates" + external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert" + + s3_endpoint = var.s3_endpoint + s3_secret_key = var.s3_secret_key + s3_access_key = var.s3_access_key + + traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable + loki_coordinator = { units = 1 } + loki_worker = { backend_units = 1, read_units = 1, write_units = 1 } + mimir_coordinator = { units = 1 } + mimir_worker = { backend_units = 1, read_units = 1, write_units = 1 } + tempo_coordinator = { units = 1 } + tempo_worker = { compactor_units = 1, distributor_units = 1, ingester_units = 1, metrics_generator_units = 1, querier_units = 1, query_frontend_units = 1 } +} diff --git a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py index 84bef0ea..974764ae 100644 --- a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py +++ b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py @@ -9,12 +9,14 @@ from helpers import ( catalogue_apps_are_reachable, + refresh_o11y_apps, wait_for_active_idle_without_error, ) import jubilant TRACK_2_TF_FILE = Path(__file__).parent.resolve() / "track-2.tf" +TRACK_DEV_TF_FILE = Path(__file__).parent.resolve() / "track-dev.tf" S3_ENDPOINT = { "s3_endpoint": os.getenv("S3_ENDPOINT"), "s3_secret_key": os.getenv("S3_SECRET_KEY"), @@ -34,3 +36,16 @@ def test_deploy_from_track(tmp_path, tf_manager, cos_model: jubilant.Juju): tf_manager.apply(model=cos_model.model, **S3_ENDPOINT) wait_for_active_idle_without_error([cos_model], timeout=5400) catalogue_apps_are_reachable(cos_model) + + +def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): + # WHEN upgraded to track n + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(model=cos_model.model) + + # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 + refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + + # THEN the model is upgraded and is active/idle + wait_for_active_idle_without_error([cos_model]) + catalogue_apps_are_reachable(cos_model) diff --git a/tests/integration/cos/tls_internal/track-2.tf b/tests/integration/cos/tls_internal/track-2.tf index fc47b30b..15e31d5a 100644 --- a/tests/integration/cos/tls_internal/track-2.tf +++ b/tests/integration/cos/tls_internal/track-2.tf @@ -30,9 +30,9 @@ variable "s3_access_key" { } module "cos" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos" + source = "git::https://github.com/canonical/observability-stack//terraform/cos?ref=track/2" model_uuid = data.juju_model.model.uuid - channel = "2/edge" + channel = "2/stable" internal_tls = "true" s3_endpoint = var.s3_endpoint diff --git a/tests/integration/cos/tls_internal/track-dev.tf b/tests/integration/cos/tls_internal/track-dev.tf new file mode 100644 index 00000000..c0f76b45 --- /dev/null +++ b/tests/integration/cos/tls_internal/track-dev.tf @@ -0,0 +1,49 @@ +terraform { + required_version = ">= 1.5" + required_providers { + juju = { + source = "juju/juju" + version = "~> 1.0" + } + } +} + +variable "model" { + type = string +} + +data "juju_model" "model" { + name = var.model + owner = "admin" +} + +variable "s3_endpoint" { + type = string +} + +variable "s3_secret_key" { + type = string +} + +variable "s3_access_key" { + type = string +} + +module "cos" { + source = "git::https://github.com/canonical/observability-stack//terraform/cos" + model_uuid = data.juju_model.model.uuid + channel = "dev/edge" + internal_tls = "true" + + s3_endpoint = var.s3_endpoint + s3_secret_key = var.s3_secret_key + s3_access_key = var.s3_access_key + + traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable + loki_coordinator = { units = 1 } + loki_worker = { backend_units = 1, read_units = 1, write_units = 1 } + mimir_coordinator = { units = 1 } + mimir_worker = { backend_units = 1, read_units = 1, write_units = 1 } + tempo_coordinator = { units = 1 } + tempo_worker = { compactor_units = 1, distributor_units = 1, ingester_units = 1, metrics_generator_units = 1, querier_units = 1, query_frontend_units = 1 } +} diff --git a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py index bf4a3dff..bcfdc846 100644 --- a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py +++ b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py @@ -9,12 +9,14 @@ from helpers import ( catalogue_apps_are_reachable, + refresh_o11y_apps, wait_for_active_idle_without_error, ) import jubilant TRACK_2_TF_FILE = Path(__file__).parent.resolve() / "track-2.tf" +TRACK_DEV_TF_FILE = Path(__file__).parent.resolve() / "track-dev.tf" S3_ENDPOINT = { "s3_endpoint": os.getenv("S3_ENDPOINT"), "s3_secret_key": os.getenv("S3_SECRET_KEY"), @@ -34,3 +36,16 @@ def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): tf_manager.apply(model=cos_model.model, **S3_ENDPOINT) wait_for_active_idle_without_error([cos_model], timeout=5400) catalogue_apps_are_reachable(cos_model) + + +def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): + # WHEN upgraded to track n + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(model=cos_model.model) + + # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 + refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + + # THEN the model is upgraded and is active/idle + wait_for_active_idle_without_error([cos_model]) + catalogue_apps_are_reachable(cos_model) diff --git a/tests/integration/cos/tls_none/track-2.tf b/tests/integration/cos/tls_none/track-2.tf index af3dbfe5..479becba 100644 --- a/tests/integration/cos/tls_none/track-2.tf +++ b/tests/integration/cos/tls_none/track-2.tf @@ -30,9 +30,9 @@ variable "s3_access_key" { } module "cos" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos" + source = "git::https://github.com/canonical/observability-stack//terraform/cos?ref=track/2" model_uuid = data.juju_model.model.uuid - channel = "2/edge" + channel = "2/stable" internal_tls = "false" s3_endpoint = var.s3_endpoint diff --git a/tests/integration/cos/tls_none/track-dev.tf b/tests/integration/cos/tls_none/track-dev.tf new file mode 100644 index 00000000..5707bea3 --- /dev/null +++ b/tests/integration/cos/tls_none/track-dev.tf @@ -0,0 +1,49 @@ +terraform { + required_version = ">= 1.5" + required_providers { + juju = { + source = "juju/juju" + version = "~> 1.0" + } + } +} + +variable "model" { + type = string +} + +data "juju_model" "model" { + name = var.model + owner = "admin" +} + +variable "s3_endpoint" { + type = string +} + +variable "s3_secret_key" { + type = string +} + +variable "s3_access_key" { + type = string +} + +module "cos" { + source = "git::https://github.com/canonical/observability-stack//terraform/cos" + model_uuid = data.juju_model.model.uuid + channel = "dev/edge" + internal_tls = "false" + + s3_endpoint = var.s3_endpoint + s3_secret_key = var.s3_secret_key + s3_access_key = var.s3_access_key + + traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable + loki_coordinator = { units = 1 } + loki_worker = { backend_units = 1, read_units = 1, write_units = 1 } + mimir_coordinator = { units = 1 } + mimir_worker = { backend_units = 1, read_units = 1, write_units = 1 } + tempo_coordinator = { units = 1 } + tempo_worker = { compactor_units = 1, distributor_units = 1, ingester_units = 1, metrics_generator_units = 1, querier_units = 1, query_frontend_units = 1 } +} diff --git a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py index e8996217..57565abc 100644 --- a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py +++ b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py @@ -15,15 +15,15 @@ import jubilant -TRACK_1_TF_FILE = Path(__file__).parent.resolve() / "track-1.tf" TRACK_2_TF_FILE = Path(__file__).parent.resolve() / "track-2.tf" +TRACK_DEV_TF_FILE = Path(__file__).parent.resolve() / "track-dev.tf" def test_deploy_from_track( tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju ): # GIVEN a module deployed from track n-1 - tf_manager.init(TRACK_1_TF_FILE) + tf_manager.init(TRACK_2_TF_FILE) tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) wait_for_active_idle_without_error([ca_model, cos_model]) @@ -32,10 +32,11 @@ def test_deploy_to_track( tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju ): # WHEN upgraded to track n + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) + # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 - # tf_manager.init(TRACK_2_TF_FILE) - # tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - refresh_o11y_apps(cos_model, channel="2/edge", base="ubuntu@24.04") + refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") # THEN the model is upgraded and is active/idle wait_for_active_idle_without_error([ca_model, cos_model]) diff --git a/tests/integration/cos_lite/tls_external/track-2.tf b/tests/integration/cos_lite/tls_external/track-2.tf index 6f819d90..fb11292a 100644 --- a/tests/integration/cos_lite/tls_external/track-2.tf +++ b/tests/integration/cos_lite/tls_external/track-2.tf @@ -32,9 +32,9 @@ module "ssc" { } module "cos-lite" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" + source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite?ref=track/2" model_uuid = data.juju_model.cos-model.uuid - channel = "2/edge" + channel = "2/stable" internal_tls = "false" external_certificates_offer_url = "admin/${var.ca_model}.certificates" external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert" diff --git a/tests/integration/cos_lite/tls_external/track-1.tf b/tests/integration/cos_lite/tls_external/track-dev.tf similarity index 95% rename from tests/integration/cos_lite/tls_external/track-1.tf rename to tests/integration/cos_lite/tls_external/track-dev.tf index 2a2f183f..8cd3de8f 100644 --- a/tests/integration/cos_lite/tls_external/track-1.tf +++ b/tests/integration/cos_lite/tls_external/track-dev.tf @@ -34,7 +34,7 @@ module "ssc" { module "cos-lite" { source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" model_uuid = data.juju_model.cos-model.uuid - channel = "1/stable" + channel = "dev/edge" internal_tls = "false" external_certificates_offer_url = "admin/${var.ca_model}.certificates" external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert" diff --git a/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py b/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py index 41ccc176..18c27b27 100644 --- a/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py +++ b/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py @@ -15,15 +15,15 @@ import jubilant -TRACK_1_TF_FILE = Path(__file__).parent.resolve() / "track-1.tf" TRACK_2_TF_FILE = Path(__file__).parent.resolve() / "track-2.tf" +TRACK_DEV_TF_FILE = Path(__file__).parent.resolve() / "track-dev.tf" def test_deploy_from_track( tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju ): # GIVEN a module deployed from track n-1 - tf_manager.init(TRACK_1_TF_FILE) + tf_manager.init(TRACK_2_TF_FILE) tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) wait_for_active_idle_without_error([ca_model, cos_model]) @@ -32,10 +32,11 @@ def test_deploy_to_track( tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju ): # WHEN upgraded to track n + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) + # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 - # tf_manager.init(TRACK_2_TF_FILE) - # tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - refresh_o11y_apps(cos_model, channel="2/edge", base="ubuntu@24.04") + refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") # THEN the model is upgraded and is active/idle wait_for_active_idle_without_error([ca_model, cos_model]) diff --git a/tests/integration/cos_lite/tls_full/track-2.tf b/tests/integration/cos_lite/tls_full/track-2.tf index d6089644..12dbff49 100644 --- a/tests/integration/cos_lite/tls_full/track-2.tf +++ b/tests/integration/cos_lite/tls_full/track-2.tf @@ -32,9 +32,9 @@ module "ssc" { } module "cos-lite" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" + source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite?ref=track/2" model_uuid = data.juju_model.cos-model.uuid - channel = "2/edge" + channel = "2/stable" internal_tls = "true" external_certificates_offer_url = "admin/${var.ca_model}.certificates" external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert" diff --git a/tests/integration/cos_lite/tls_full/track-1.tf b/tests/integration/cos_lite/tls_full/track-dev.tf similarity index 95% rename from tests/integration/cos_lite/tls_full/track-1.tf rename to tests/integration/cos_lite/tls_full/track-dev.tf index fa75e106..bb4e48a5 100644 --- a/tests/integration/cos_lite/tls_full/track-1.tf +++ b/tests/integration/cos_lite/tls_full/track-dev.tf @@ -34,10 +34,11 @@ module "ssc" { module "cos-lite" { source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" model_uuid = data.juju_model.cos-model.uuid - channel = "1/stable" + channel = "dev/edge" internal_tls = "true" external_certificates_offer_url = "admin/${var.ca_model}.certificates" external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert" traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable } + diff --git a/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py b/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py index 33a4e94c..97ac2e2c 100644 --- a/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py +++ b/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py @@ -14,23 +14,24 @@ import jubilant -TRACK_1_TF_FILE = Path(__file__).parent.resolve() / "track-1.tf" TRACK_2_TF_FILE = Path(__file__).parent.resolve() / "track-2.tf" +TRACK_DEV_TF_FILE = Path(__file__).parent.resolve() / "track-dev.tf" def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): # GIVEN a module deployed from track n-1 - tf_manager.init(TRACK_1_TF_FILE) + tf_manager.init(TRACK_2_TF_FILE) tf_manager.apply(model=cos_model.model) wait_for_active_idle_without_error([cos_model]) def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(model=cos_model.model) + # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 - # tf_manager.init(TRACK_2_TF_FILE) - # tf_manager.apply(model=cos_model.model) - refresh_o11y_apps(cos_model, channel="2/edge", base="ubuntu@24.04") + refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") # THEN the model is upgraded and is active/idle wait_for_active_idle_without_error([cos_model]) diff --git a/tests/integration/cos_lite/tls_internal/track-2.tf b/tests/integration/cos_lite/tls_internal/track-2.tf index 051f8c60..fbcbdaa3 100644 --- a/tests/integration/cos_lite/tls_internal/track-2.tf +++ b/tests/integration/cos_lite/tls_internal/track-2.tf @@ -18,9 +18,9 @@ data "juju_model" "model" { } module "cos-lite" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" + source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite?ref=track/2" model_uuid = data.juju_model.model.uuid - channel = "2/edge" + channel = "2/stable" internal_tls = "true" traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable diff --git a/tests/integration/cos_lite/tls_internal/track-1.tf b/tests/integration/cos_lite/tls_internal/track-dev.tf similarity index 95% rename from tests/integration/cos_lite/tls_internal/track-1.tf rename to tests/integration/cos_lite/tls_internal/track-dev.tf index b0b66db5..266cb6aa 100644 --- a/tests/integration/cos_lite/tls_internal/track-1.tf +++ b/tests/integration/cos_lite/tls_internal/track-dev.tf @@ -20,7 +20,7 @@ data "juju_model" "model" { module "cos-lite" { source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" model_uuid = data.juju_model.model.uuid - channel = "1/stable" + channel = "dev/edge" internal_tls = "true" traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable diff --git a/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py b/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py index f346fddf..f830976b 100644 --- a/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py +++ b/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py @@ -14,23 +14,24 @@ import jubilant -TRACK_1_TF_FILE = Path(__file__).parent.resolve() / "track-1.tf" TRACK_2_TF_FILE = Path(__file__).parent.resolve() / "track-2.tf" +TRACK_DEV_TF_FILE = Path(__file__).parent.resolve() / "track-dev.tf" def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): # GIVEN a module deployed from track n-1 - tf_manager.init(TRACK_1_TF_FILE) + tf_manager.init(TRACK_2_TF_FILE) tf_manager.apply(model=cos_model.model) wait_for_active_idle_without_error([cos_model]) def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(model=cos_model.model) + # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 - # tf_manager.init(TRACK_2_TF_FILE) - # tf_manager.apply(model=cos_model.model) - refresh_o11y_apps(cos_model, channel="2/edge", base="ubuntu@24.04") + refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") # THEN the model is upgraded and is active/idle wait_for_active_idle_without_error([cos_model]) diff --git a/tests/integration/cos_lite/tls_none/track-2.tf b/tests/integration/cos_lite/tls_none/track-2.tf index a9beb974..e94708d5 100644 --- a/tests/integration/cos_lite/tls_none/track-2.tf +++ b/tests/integration/cos_lite/tls_none/track-2.tf @@ -18,9 +18,9 @@ data "juju_model" "model" { } module "cos-lite" { - source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" + source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite?ref=track/2" model_uuid = data.juju_model.model.uuid - channel = "2/edge" + channel = "2/stable" internal_tls = "false" traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable diff --git a/tests/integration/cos_lite/tls_none/track-1.tf b/tests/integration/cos_lite/tls_none/track-dev.tf similarity index 95% rename from tests/integration/cos_lite/tls_none/track-1.tf rename to tests/integration/cos_lite/tls_none/track-dev.tf index 0728a4b1..3cbe40ef 100644 --- a/tests/integration/cos_lite/tls_none/track-1.tf +++ b/tests/integration/cos_lite/tls_none/track-dev.tf @@ -20,7 +20,7 @@ data "juju_model" "model" { module "cos-lite" { source = "git::https://github.com/canonical/observability-stack//terraform/cos-lite" model_uuid = data.juju_model.model.uuid - channel = "1/stable" + channel = "dev/edge" internal_tls = "false" traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable From 7a26eb0a9d41db28a70c2b62a0d36d20d77a0f2c Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Fri, 21 Nov 2025 15:59:42 -0500 Subject: [PATCH 2/9] chore: remove branch PR CI rule --- .github/workflows/terraform.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 128a8707..d52feee4 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -2,8 +2,6 @@ name: Terraform on: pull_request: - branches: - - main paths: - "**/*.tf" From 38398c006876ebd27eafb0725884db1bf288471d Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Mon, 24 Nov 2025 10:50:26 -0500 Subject: [PATCH 3/9] chore --- .../cos/tls_external/test_upgrade_cos_tls_external.py | 8 ++++---- .../cos/tls_full/test_upgrade_cos_tls_full.py | 8 ++++---- .../cos/tls_internal/test_upgrade_cos_tls_internal.py | 8 ++++---- .../cos/tls_none/test_upgrade_cos_tls_none.py | 8 ++++---- .../tls_external/test_upgrade_cos_lite_tls_external.py | 10 +++++----- .../tls_full/test_upgrade_cos_lite_tls_full.py | 8 ++++---- .../tls_internal/test_upgrade_cos_lite_tls_internal.py | 8 ++++---- .../tls_none/test_upgrade_cos_lite_tls_none.py | 8 ++++---- 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py index 6d7d72ef..94fa01ec 100644 --- a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py +++ b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py @@ -46,13 +46,13 @@ def test_deploy_to_track( tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju ): # WHEN upgraded to track n - tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - + cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - # THEN the model is upgraded and is active/idle + # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([ca_model, cos_model]) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") catalogue_apps_are_reachable(cos_model, tls_ctx) diff --git a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py index 05247e73..18852f84 100644 --- a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py +++ b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py @@ -46,13 +46,13 @@ def test_deploy_to_track( tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju ): # WHEN upgraded to track n - tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - + cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - # THEN the model is upgraded and is active/idle + # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([ca_model, cos_model]) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") catalogue_apps_are_reachable(cos_model, tls_ctx) diff --git a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py index 974764ae..5daab262 100644 --- a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py +++ b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py @@ -40,12 +40,12 @@ def test_deploy_from_track(tmp_path, tf_manager, cos_model: jubilant.Juju): def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n - tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(model=cos_model.model) - + cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(cos_model=cos_model.model) - # THEN the model is upgraded and is active/idle + # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) catalogue_apps_are_reachable(cos_model) diff --git a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py index bcfdc846..a3ff4e32 100644 --- a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py +++ b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py @@ -40,12 +40,12 @@ def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n - tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(model=cos_model.model) - + cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(cos_model=cos_model.model) - # THEN the model is upgraded and is active/idle + # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) catalogue_apps_are_reachable(cos_model) diff --git a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py index 57565abc..84ff919b 100644 --- a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py +++ b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py @@ -32,13 +32,13 @@ def test_deploy_to_track( tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju ): # WHEN upgraded to track n - tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - + cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") - - # THEN the model is upgraded and is active/idle + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) + + # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([ca_model, cos_model]) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") catalogue_apps_are_reachable(cos_model, tls_ctx) diff --git a/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py b/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py index 18c27b27..da304503 100644 --- a/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py +++ b/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py @@ -32,13 +32,13 @@ def test_deploy_to_track( tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju ): # WHEN upgraded to track n - tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - + cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) - # THEN the model is upgraded and is active/idle + # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([ca_model, cos_model]) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") catalogue_apps_are_reachable(cos_model, tls_ctx) diff --git a/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py b/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py index 97ac2e2c..61d63104 100644 --- a/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py +++ b/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py @@ -27,12 +27,12 @@ def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n - tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(model=cos_model.model) - + cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(cos_model=cos_model.model) - # THEN the model is upgraded and is active/idle + # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) catalogue_apps_are_reachable(cos_model) diff --git a/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py b/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py index f830976b..c61af2d7 100644 --- a/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py +++ b/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py @@ -27,12 +27,12 @@ def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n - tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(model=cos_model.model) - + cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") + tf_manager.init(TRACK_DEV_TF_FILE) + tf_manager.apply(cos_model=cos_model.model) - # THEN the model is upgraded and is active/idle + # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) catalogue_apps_are_reachable(cos_model) From 16f6be552aaa9cdef61e99a183105c5843842ba2 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Mon, 24 Nov 2025 12:15:44 -0500 Subject: [PATCH 4/9] chore: bump the default timeout for model settling --- tests/integration/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index 45b4ff89..eee395af 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -54,7 +54,7 @@ def destroy(self, **kwargs): def wait_for_active_idle_without_error( - jujus: List[jubilant.Juju], timeout: int = 60 * 20 + jujus: List[jubilant.Juju], timeout: int = 60 * 30 ): for juju in jujus: print(f"\nwaiting for the model ({juju.model}) to settle ...\n") From a0e76ab5985cd72d145855a86d9ac0dfcca3a336 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Mon, 24 Nov 2025 22:00:00 -0500 Subject: [PATCH 5/9] fix: CI --- .../cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py | 2 ++ .../cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py index 84ff919b..b7feb70f 100644 --- a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py +++ b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py @@ -33,6 +33,7 @@ def test_deploy_to_track( ): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") + wait_for_active_idle_without_error([ca_model, cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) @@ -41,4 +42,5 @@ def test_deploy_to_track( # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([ca_model, cos_model]) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") + breakpoint() catalogue_apps_are_reachable(cos_model, tls_ctx) diff --git a/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py b/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py index da304503..e7016bd9 100644 --- a/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py +++ b/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py @@ -33,6 +33,7 @@ def test_deploy_to_track( ): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") + wait_for_active_idle_without_error([ca_model, cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) From 79b3bbad3cbe830ce6582a1c3ca7f17126795b2b Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Tue, 25 Nov 2025 11:14:03 -0500 Subject: [PATCH 6/9] chore: remove breakpoint --- .../cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py index b7feb70f..e4f838aa 100644 --- a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py +++ b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py @@ -42,5 +42,4 @@ def test_deploy_to_track( # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([ca_model, cos_model]) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") - breakpoint() catalogue_apps_are_reachable(cos_model, tls_ctx) From 495eb0fb481abdaa3debd93b001c65cb679e2d3e Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Tue, 25 Nov 2025 11:49:09 -0500 Subject: [PATCH 7/9] chore: wait after removal of grafana ingress relation --- .../cos/tls_external/test_upgrade_cos_tls_external.py | 1 + tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py | 1 + .../cos/tls_internal/test_upgrade_cos_tls_internal.py | 1 + tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py | 1 + .../cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py | 2 +- .../cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py | 2 +- .../cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py | 1 + .../cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py | 1 + 8 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py index 94fa01ec..5e678739 100644 --- a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py +++ b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py @@ -47,6 +47,7 @@ def test_deploy_to_track( ): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") + wait_for_active_idle_without_error([cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) diff --git a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py index 18852f84..0c657bec 100644 --- a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py +++ b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py @@ -47,6 +47,7 @@ def test_deploy_to_track( ): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") + wait_for_active_idle_without_error([cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) diff --git a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py index 5daab262..00cd7418 100644 --- a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py +++ b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py @@ -41,6 +41,7 @@ def test_deploy_from_track(tmp_path, tf_manager, cos_model: jubilant.Juju): def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") + wait_for_active_idle_without_error([cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) diff --git a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py index a3ff4e32..57310b10 100644 --- a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py +++ b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py @@ -41,6 +41,7 @@ def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") + wait_for_active_idle_without_error([cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) diff --git a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py index e4f838aa..96b64b43 100644 --- a/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py +++ b/tests/integration/cos_lite/tls_external/test_upgrade_cos_lite_tls_external.py @@ -33,7 +33,7 @@ def test_deploy_to_track( ): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") - wait_for_active_idle_without_error([ca_model, cos_model]) + wait_for_active_idle_without_error([cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) diff --git a/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py b/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py index e7016bd9..7cb258ec 100644 --- a/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py +++ b/tests/integration/cos_lite/tls_full/test_upgrade_cos_lite_tls_full.py @@ -33,7 +33,7 @@ def test_deploy_to_track( ): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") - wait_for_active_idle_without_error([ca_model, cos_model]) + wait_for_active_idle_without_error([cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) diff --git a/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py b/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py index 61d63104..c2ec2104 100644 --- a/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py +++ b/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py @@ -28,6 +28,7 @@ def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") + wait_for_active_idle_without_error([cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) diff --git a/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py b/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py index c61af2d7..3b27055c 100644 --- a/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py +++ b/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py @@ -28,6 +28,7 @@ def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju): def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # WHEN upgraded to track n cos_model.remove_relation("traefik:traefik-route", "grafana:ingress") + wait_for_active_idle_without_error([cos_model]) # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) From d9548d1cf6035f082e0bf7e95efa012d9adc3620 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Tue, 25 Nov 2025 12:17:34 -0500 Subject: [PATCH 8/9] chore --- .../cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py | 2 +- .../cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py b/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py index c2ec2104..152d37d3 100644 --- a/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py +++ b/tests/integration/cos_lite/tls_internal/test_upgrade_cos_lite_tls_internal.py @@ -32,7 +32,7 @@ def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(cos_model=cos_model.model) + tf_manager.apply(model=cos_model.model) # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) diff --git a/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py b/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py index 3b27055c..66c8908f 100644 --- a/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py +++ b/tests/integration/cos_lite/tls_none/test_upgrade_cos_lite_tls_none.py @@ -32,7 +32,7 @@ def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(cos_model=cos_model.model) + tf_manager.apply(model=cos_model.model) # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) From 2b1d63aadebc60e84dc86e5335a25be31274fac6 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Tue, 25 Nov 2025 12:19:17 -0500 Subject: [PATCH 9/9] chore --- .../cos/tls_external/test_upgrade_cos_tls_external.py | 2 +- tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py | 2 +- .../cos/tls_internal/test_upgrade_cos_tls_internal.py | 2 +- tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py index 5e678739..931fb5e2 100644 --- a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py +++ b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py @@ -51,7 +51,7 @@ def test_deploy_to_track( # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model, **S3_ENDPOINT) # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([ca_model, cos_model]) diff --git a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py index 0c657bec..7ffb87e5 100644 --- a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py +++ b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py @@ -51,7 +51,7 @@ def test_deploy_to_track( # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model) + tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model, **S3_ENDPOINT) # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([ca_model, cos_model]) diff --git a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py index 00cd7418..d08e745d 100644 --- a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py +++ b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py @@ -45,7 +45,7 @@ def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(cos_model=cos_model.model) + tf_manager.apply(model=cos_model.model, **S3_ENDPOINT) # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) diff --git a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py index 57310b10..419dfaf1 100644 --- a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py +++ b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py @@ -45,7 +45,7 @@ def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # FIXME: https://github.com/juju/terraform-provider-juju/issues/967 refresh_o11y_apps(cos_model, channel="dev/edge", base="ubuntu@24.04") tf_manager.init(TRACK_DEV_TF_FILE) - tf_manager.apply(cos_model=cos_model.model) + tf_manager.apply(model=cos_model.model, **S3_ENDPOINT) # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model])