From b277463be8e2db949935a6d270e5b710e0234ff3 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Thu, 18 Dec 2025 12:15:47 -0500 Subject: [PATCH 1/4] feat: Check otelcol logs in COS tests --- .../cos/tls_external/test_upgrade_cos_tls_external.py | 2 ++ .../integration/cos/tls_full/test_upgrade_cos_tls_full.py | 2 ++ .../cos/tls_internal/test_upgrade_cos_tls_internal.py | 2 ++ .../integration/cos/tls_none/test_upgrade_cos_tls_none.py | 2 ++ tests/integration/helpers.py | 7 +++++++ 5 files changed, 15 insertions(+) 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 931fb5e..b81fc5b 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 @@ -11,6 +11,7 @@ catalogue_apps_are_reachable, get_tls_context, refresh_o11y_apps, + no_errors_in_otelcol_logs, wait_for_active_idle_without_error, ) @@ -57,3 +58,4 @@ def test_deploy_to_track( 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) + no_errors_in_otelcol_logs(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 7ffb87e..aedb2ae 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,6 +10,7 @@ from helpers import ( catalogue_apps_are_reachable, get_tls_context, + no_errors_in_otelcol_logs, refresh_o11y_apps, wait_for_active_idle_without_error, ) @@ -57,3 +58,4 @@ def test_deploy_to_track( 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) + no_errors_in_otelcol_logs(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 d08e745..1f163d4 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,6 +9,7 @@ from helpers import ( catalogue_apps_are_reachable, + no_errors_in_otelcol_logs, refresh_o11y_apps, wait_for_active_idle_without_error, ) @@ -50,3 +51,4 @@ def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) catalogue_apps_are_reachable(cos_model) + no_errors_in_otelcol_logs(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 419dfaf..269a39d 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,6 +9,7 @@ from helpers import ( catalogue_apps_are_reachable, + no_errors_in_otelcol_logs, refresh_o11y_apps, wait_for_active_idle_without_error, ) @@ -50,3 +51,4 @@ def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) catalogue_apps_are_reachable(cos_model) + no_errors_in_otelcol_logs(cos_model) diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index 84f5a6e..cfc1dbf 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -99,3 +99,10 @@ def catalogue_apps_are_reachable( continue response = urlopen(url, data=None, timeout=2.0, context=tls_context) assert response.code == 200, f"{app} was not reachable" + + +def no_errors_in_otelcol_logs(juju: jubilant.Juju): + # By default, no debug exporters have been configured and otelcol logs at the WARN level + # Thus, there should be no logs outputted if otelcol is operating correctly + stdout = juju.ssh("otelcol/0", "pebble logs", container="otelcol") + assert not stdout From e521c7278e74efd1a69bb83f2c0b58a781a3cff2 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Thu, 18 Dec 2025 12:39:28 -0500 Subject: [PATCH 2/4] chore: trigger CI --- tests/integration/cos/tls_external/track-2.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/cos/tls_external/track-2.tf b/tests/integration/cos/tls_external/track-2.tf index 9766172..8a6c33f 100644 --- a/tests/integration/cos/tls_external/track-2.tf +++ b/tests/integration/cos/tls_external/track-2.tf @@ -16,6 +16,7 @@ variable "ca_model" { type = string } + data "juju_model" "ca-model" { name = var.ca_model owner = "admin" From de602a2bc16beab62d74d8079ab120858586f64c Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Tue, 6 Jan 2026 12:03:36 -0500 Subject: [PATCH 3/4] chore: mark.skip this test --- tests/integration/helpers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index cfc1dbf..25af5a2 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -9,6 +9,7 @@ from urllib.request import urlopen import jubilant +import pytest class TfDirManager: @@ -101,6 +102,13 @@ def catalogue_apps_are_reachable( assert response.code == 200, f"{app} was not reachable" +@pytest.mark.skip( + reason="""Waiting for the following issues to be resolved: +- https://github.com/canonical/cos-coordinated-workers/issues/123 +- https://github.com/canonical/tempo-operators/issues/254 +- https://github.com/canonical/cos-coordinated-workers/issues/115 +""" +) def no_errors_in_otelcol_logs(juju: jubilant.Juju): # By default, no debug exporters have been configured and otelcol logs at the WARN level # Thus, there should be no logs outputted if otelcol is operating correctly From 37ddf83eb9c6c8baabed571afa7c10cb53daa6a8 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Mon, 5 Jan 2026 12:53:21 -0500 Subject: [PATCH 4/4] feat: Named workflows (#171) --- .github/workflows/_integration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/_integration.yml b/.github/workflows/_integration.yml index 0572978..115f606 100644 --- a/.github/workflows/_integration.yml +++ b/.github/workflows/_integration.yml @@ -1,4 +1,5 @@ name: Test the Terraform product module +run-name: Deploy ${{ inputs.product }} on ${{ inputs.runner }} on: workflow_dispatch: