Skip to content

OBSINTA-1219: add e2e tests for UIPlugin incident detection#1038

Open
DavidRajnoha wants to merge 1 commit intorhobs:mainfrom
DavidRajnoha:test/e2e-uiplugin-cluster-health-analyzer
Open

OBSINTA-1219: add e2e tests for UIPlugin incident detection#1038
DavidRajnoha wants to merge 1 commit intorhobs:mainfrom
DavidRajnoha:test/e2e-uiplugin-cluster-health-analyzer

Conversation

@DavidRajnoha
Copy link

Add end-to-end tests that validate the monitoring UIPlugin with cluster-health-analyzer: a deployment readiness check and a functional test that triggers a CrashLoopBackOff alert and verifies the cluster_health_components_map incident metric is produced.

Also introduce AssertPromQLResultWithOptions to allow callers to override the default poll interval and timeout, and generalize waitForDBUIPluginDeletion to waitForUIPluginDeletion.

@openshift-ci
Copy link

openshift-ci bot commented Mar 16, 2026

Hi @DavidRajnoha. Thanks for your PR.

I'm waiting for a rhobs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@DavidRajnoha DavidRajnoha force-pushed the test/e2e-uiplugin-cluster-health-analyzer branch from 98bf576 to 89ac678 Compare March 16, 2026 11:57
@openshift-ci
Copy link

openshift-ci bot commented Mar 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: DavidRajnoha
Once this PR has been reviewed and has the lgtm label, please assign jan--f for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@DavidRajnoha DavidRajnoha force-pushed the test/e2e-uiplugin-cluster-health-analyzer branch from 89ac678 to 0768ae2 Compare March 16, 2026 14:36
@tremes
Copy link
Contributor

tremes commented Mar 17, 2026

/ok-to-test

@DavidRajnoha
Copy link
Author

/retest

@DavidRajnoha DavidRajnoha changed the title test: add e2e tests for UIPlugin incident detection OBSINTA-1219: add e2e tests for UIPlugin incident detection Mar 18, 2026
@openshift-ci-robot
Copy link
Collaborator

@DavidRajnoha: This pull request references OBSINTA-1219 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Add end-to-end tests that validate the monitoring UIPlugin with cluster-health-analyzer: a deployment readiness check and a functional test that triggers a CrashLoopBackOff alert and verifies the cluster_health_components_map incident metric is produced.

Also introduce AssertPromQLResultWithOptions to allow callers to override the default poll interval and timeout, and generalize waitForDBUIPluginDeletion to waitForUIPluginDeletion.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@DavidRajnoha DavidRajnoha force-pushed the test/e2e-uiplugin-cluster-health-analyzer branch 2 times, most recently from f427aa1 to 970ac8c Compare March 18, 2026 10:33
Validate that the Monitoring UIPlugin with ClusterHealthAnalyzer enabled
deploys the health-analyzer and correctly processes alerts into incident
metrics. The test creates a crashing pod, waits for the corresponding
PrometheusRule alert to fire, then verifies the cluster_health_components_map
metric is exposed with the expected labels.

Also extends the framework's AssertPromQLResult with configurable timeout
and poll interval options (AssertPromQLResultWithOptions).

Made-with: Cursor
@DavidRajnoha DavidRajnoha force-pushed the test/e2e-uiplugin-cluster-health-analyzer branch from 970ac8c to 90b891c Compare March 18, 2026 11:25
deployName := "e2e-crasher-" + suffix

rule := newCrashLoopRule(t, ruleName, alertName, deployName)
err = f.K8sClient.Create(context.Background(), rule)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can use t.Context()


monv1.AddToScheme(f.K8sClient.Scheme())

plugin := newMonitoringUIPlugin(t)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's enabled in the tests, but I think this requires the OpenShift feature gate to be enabled.

@DavidRajnoha
Copy link
Author

/hold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants