Skip to content

Commit 713410a

Browse files
committed
Remove duplicated alert testing stack
This is confusing but this commit removes two alert tests: [sig-instrumentation][Late] Alerts shouldn't report any unexpected alerts in firing or pending state [apigroup:config.openshift.io] [Suite:openshift/conformance/parallel] - Ginko test run Late during e2e, live queries prometheus for the duration of the run, skips any alerts that have their own test, and flakes if any are found. It cannot fail. - Flake rate is about 80%. - This test is being removed in favor of the new one based on intervals observed. (see pkg/monitortests/testframework/legacytestframeworkmonitortests/monitortest.go. [sig-arch] Check if alerts are firing during or after upgrade success - Monitor test run after upgrade. - Uses basically the same approach/code as above. - Flake rate is 97%. - This test is being removed in favor of the new one based on intervals observed. (see pkg/monitortests/testframework/legacytestframeworkmonitortests/monitortest.go. Removing these two tests dramatically simplies our stack so we can begin working on resurrecting some form of alert testing in just one spot. The remaining backstop test is: [sig-trt][invariant] No alerts without an explicit test should be firing/pending more than historically It is a 100% flake. NOTE: A similarly named test that can fail and does catch real problems is NOT being removed: [sig-instrumentation] Prometheus [apigroup:image.openshift.io] when installed on the cluster shouldn't report any alerts in firing state apart from Watchdog and AlertmanagerReceiversNotConfigured [Early][apigroup:config.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]
1 parent d90ca10 commit 713410a

File tree

6 files changed

+5
-218
lines changed

6 files changed

+5
-218
lines changed

pkg/alerts/check.go

Lines changed: 0 additions & 146 deletions
This file was deleted.

pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
configv1 "github.com/openshift/api/config/v1"
1313
"github.com/sirupsen/logrus"
1414

15-
"github.com/openshift/origin/pkg/alerts"
1615
"github.com/openshift/origin/pkg/monitor/monitorapi"
1716
"github.com/openshift/origin/pkg/test/ginkgo/junitapi"
1817
helper "github.com/openshift/origin/test/extended/util/prometheus"
@@ -26,8 +25,10 @@ import (
2625
"k8s.io/kubernetes/test/e2e/framework"
2726
)
2827

28+
type AllowedAlertsFunc func(featureSet configv1.FeatureSet) (allowedFiringWithBugs, allowedFiring, allowedPendingWithBugs, allowedPending helper.MetricConditions)
29+
2930
func testAlerts(events monitorapi.Intervals,
30-
allowancesFunc alerts.AllowedAlertsFunc,
31+
allowancesFunc AllowedAlertsFunc,
3132
jobType *platformidentification.JobType,
3233
restConfig *rest.Config,
3334
duration time.Duration,
@@ -74,7 +75,7 @@ func testAlerts(events monitorapi.Intervals,
7475
}
7576

7677
func RunAlertTests(jobType *platformidentification.JobType,
77-
allowancesFunc alerts.AllowedAlertsFunc,
78+
allowancesFunc AllowedAlertsFunc,
7879
featureSet configv1.FeatureSet,
7980
etcdAllowance allowedalerts2.AlertTestAllowanceCalculator,
8081
events monitorapi.Intervals,
@@ -109,7 +110,7 @@ func RunAlertTests(jobType *platformidentification.JobType,
109110
// runBackstopTest will process the intervals for any alerts which do not have their own explicit test,
110111
// and look for any pending/firing intervals that are not within sufficient range.
111112
func runBackstopTest(
112-
allowancesFunc alerts.AllowedAlertsFunc,
113+
allowancesFunc AllowedAlertsFunc,
113114
featureSet configv1.FeatureSet,
114115
alertIntervals monitorapi.Intervals,
115116
alertTests []allowedalerts2.AlertTest) []*junitapi.JUnitTestCase {

test/e2e/upgrade/alert/alert.go

Lines changed: 0 additions & 57 deletions
This file was deleted.

test/e2e/upgrade/upgrade.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import (
3838
"k8s.io/kubernetes/test/e2e/upgrades/node"
3939

4040
"github.com/openshift/origin/test/e2e/upgrade/adminack"
41-
"github.com/openshift/origin/test/e2e/upgrade/alert"
4241
"github.com/openshift/origin/test/e2e/upgrade/dns"
4342
"github.com/openshift/origin/test/e2e/upgrade/manifestdelete"
4443
"github.com/openshift/origin/test/extended/prometheus"
@@ -56,7 +55,6 @@ func AllTests() []upgrades.Test {
5655
return []upgrades.Test{
5756
&adminack.UpgradeTest{},
5857
&manifestdelete.UpgradeTest{},
59-
&alert.UpgradeTest{},
6058

6159
&node.SecretUpgradeTest{},
6260
&apps.ReplicaSetUpgradeTest{},

test/extended/prometheus/prometheus.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616

1717
g "github.com/onsi/ginkgo/v2"
1818
o "github.com/onsi/gomega"
19-
"github.com/openshift/origin/pkg/alerts"
2019
promv1 "github.com/prometheus/client_golang/api/prometheus/v1"
2120
dto "github.com/prometheus/client_model/go"
2221
"github.com/prometheus/common/expfmt"
@@ -252,12 +251,6 @@ var _ = g.Describe("[sig-instrumentation][Late] Alerts", func() {
252251
}
253252
})
254253

255-
g.It("shouldn't report any unexpected alerts in firing or pending state", func() {
256-
// we only consider samples since the beginning of the test
257-
testDuration := exutil.DurationSinceStartInSeconds()
258-
alerts.CheckAlerts(alerts.AllowedAlertsDuringConformance, oc.NewPrometheusClient(context.TODO()), oc.AdminConfigClient(), testDuration, nil)
259-
})
260-
261254
g.It("shouldn't exceed the series limit of total series sent via telemetry from each cluster", func() {
262255
if enabledErr, err := telemetryIsEnabled(ctx, oc.AdminKubeClient()); err != nil {
263256
e2e.Failf("could not determine if Telemetry is enabled: %v", err)

test/extended/util/annotate/generated/zz_generated.annotations.go

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)