From 03d8262708b199d9d94ce52c879ba30816bca7a2 Mon Sep 17 00:00:00 2001 From: Dustin Row Date: Tue, 5 May 2026 07:11:04 -0700 Subject: [PATCH 1/3] Allow CreateMustGather alert in conformance tests CreateMustGather is a managed-cluster-config meta-alert that fires when any other alert has been active for 15 minutes, triggering CAD to collect a must-gather. It fires during cluster install settling and fails the alerts-in-firing-state conformance test. Jira: https://redhat.atlassian.net/browse/SREP-4796 --- pkg/monitortestlibrary/allowedalerts/types.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/monitortestlibrary/allowedalerts/types.go b/pkg/monitortestlibrary/allowedalerts/types.go index 88a8b8b70425..ad809caf89e1 100644 --- a/pkg/monitortestlibrary/allowedalerts/types.go +++ b/pkg/monitortestlibrary/allowedalerts/types.go @@ -40,7 +40,8 @@ var AllowedAlertNames = []string{ "Watchdog", "AlertmanagerReceiversNotConfigured", "PrometheusRemoteWriteDesiredShards", - "KubeJobFailingSRE", // https://issues.redhat.com/browse/OCPBUGS-55635 + "KubeJobFailingSRE", // https://issues.redhat.com/browse/OCPBUGS-55635 + "CreateMustGather", // https://issues.redhat.com/browse/SREP-4796 - CAD meta-alert for must-gather collection // indicates a problem in the external Telemeter service, presently very common, does not impact our ability to e2e test: "TelemeterClientFailures", From 88d7dc60cd0e5623074fbeb975a69958ea4f67d5 Mon Sep 17 00:00:00 2001 From: Dustin Row Date: Tue, 5 May 2026 09:16:43 -0700 Subject: [PATCH 2/3] Fix gofmt whitespace --- pkg/monitortestlibrary/allowedalerts/types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/monitortestlibrary/allowedalerts/types.go b/pkg/monitortestlibrary/allowedalerts/types.go index ad809caf89e1..7abbe5b365ea 100644 --- a/pkg/monitortestlibrary/allowedalerts/types.go +++ b/pkg/monitortestlibrary/allowedalerts/types.go @@ -40,8 +40,8 @@ var AllowedAlertNames = []string{ "Watchdog", "AlertmanagerReceiversNotConfigured", "PrometheusRemoteWriteDesiredShards", - "KubeJobFailingSRE", // https://issues.redhat.com/browse/OCPBUGS-55635 - "CreateMustGather", // https://issues.redhat.com/browse/SREP-4796 - CAD meta-alert for must-gather collection + "KubeJobFailingSRE", // https://issues.redhat.com/browse/OCPBUGS-55635 + "CreateMustGather", // https://issues.redhat.com/browse/SREP-4796 // indicates a problem in the external Telemeter service, presently very common, does not impact our ability to e2e test: "TelemeterClientFailures", From 925b1f85a1b6dc79c393fdf04b294ef7deca62f7 Mon Sep 17 00:00:00 2001 From: Dustin Row Date: Thu, 7 May 2026 07:49:32 -0700 Subject: [PATCH 3/3] Use regex pattern for CreateMustGather alert name The CAD team plans to add a suffix to the alert name. Use a regex pattern so the allowlist matches both current and future variants. Jira: https://redhat.atlassian.net/browse/SREP-4796 --- pkg/monitortestlibrary/allowedalerts/types.go | 4 ++-- .../testframework/legacytestframeworkmonitortests/alerts.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/monitortestlibrary/allowedalerts/types.go b/pkg/monitortestlibrary/allowedalerts/types.go index 7abbe5b365ea..75fded773fac 100644 --- a/pkg/monitortestlibrary/allowedalerts/types.go +++ b/pkg/monitortestlibrary/allowedalerts/types.go @@ -40,8 +40,8 @@ var AllowedAlertNames = []string{ "Watchdog", "AlertmanagerReceiversNotConfigured", "PrometheusRemoteWriteDesiredShards", - "KubeJobFailingSRE", // https://issues.redhat.com/browse/OCPBUGS-55635 - "CreateMustGather", // https://issues.redhat.com/browse/SREP-4796 + "KubeJobFailingSRE", // https://issues.redhat.com/browse/OCPBUGS-55635 + "CreateMustGather.*", // https://issues.redhat.com/browse/SREP-4796 // indicates a problem in the external Telemeter service, presently very common, does not impact our ability to e2e test: "TelemeterClientFailures", diff --git a/pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go b/pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go index 4ffa3af37dc6..d2e2cf50b6dc 100644 --- a/pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go +++ b/pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go @@ -3,6 +3,7 @@ package legacytestframeworkmonitortests import ( "context" "fmt" + "regexp" "strings" "time" @@ -239,7 +240,7 @@ func runBackstopTest( func isSkippedAlert(alertName string) bool { // Some alerts we always skip over in CI: for _, a := range allowedalerts.AllowedAlertNames { - if a == alertName { + if matched, _ := regexp.MatchString("^"+a+"$", alertName); matched { return true } }