Skip to content

chore: refactor e2e test diagnostic#1144

Merged
openshift-merge-bot[bot] merged 1 commit into
rhobs:mainfrom
simonpasquier:refactor-e2e-test-diagnostic
Jul 16, 2026
Merged

chore: refactor e2e test diagnostic#1144
openshift-merge-bot[bot] merged 1 commit into
rhobs:mainfrom
simonpasquier:refactor-e2e-test-diagnostic

Conversation

@simonpasquier

Copy link
Copy Markdown
Contributor

Follow-up of #1115

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates e2e failure diagnostics in the framework and test callsites. DumpOnFailure now logs a diagnostics header, DebugNamespace becomes DebugNamespaces with an internal namespace dump logger, and DebugUIPlugin is added for named UIPlugin inspection. The e2e tests switch to the new namespace helper, the cluster health analyzer test uses the new UIPlugin helper, and pkg/apis/uiplugin/v1alpha1/types.go adds exported UIPlugin name constants.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: davidrajnoha, jan--f, jgbernalp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and matches the main change: refactoring e2e test diagnostics.
Description check ✅ Passed The description is related to the changeset because it notes this PR is a follow-up to a related prior change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from jan--f and jgbernalp June 30, 2026 15:53

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/uiplugin_cluster_health_analyzer_test.go`:
- Around line 34-40: Register the UIPlugin and namespace failure diagnostics
before the first potentially failing assertion in the test so a create failure
still captures them: in the test that calls resetMonitoringUIPlugin and
f.K8sClient.Create, move f.DumpOnFailure(t, f.DebugUIPlugin(plugin.Name)) ahead
of the create/assertion, and add failure dumping for prometheusRuleNamespace as
well since the later PrometheusRule setup and wait checks depend on it. Keep the
existing uiPluginInstallNS dump, but ensure both namespaces and the plugin dump
are registered early enough to cover all failure paths in this test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 8fb8f16a-552e-4378-b48e-08856be3bc7d

📥 Commits

Reviewing files that changed from the base of the PR and between 78d39b1 and 54342f2.

📒 Files selected for processing (10)
  • test/e2e/framework/framework.go
  • test/e2e/framework/uiplugin.go
  • test/e2e/monitoring_stack_controller_test.go
  • test/e2e/observability_installer_test.go
  • test/e2e/operator_metrics_test.go
  • test/e2e/po_admission_webhook_test.go
  • test/e2e/prometheus_operator_test.go
  • test/e2e/thanos_querier_controller_test.go
  • test/e2e/uiplugin_cluster_health_analyzer_test.go
  • test/e2e/uiplugin_test.go

Comment thread test/e2e/uiplugin_cluster_health_analyzer_test.go
@simonpasquier
simonpasquier force-pushed the refactor-e2e-test-diagnostic branch 2 times, most recently from 9a23f8c to 0d9726c Compare July 1, 2026 08:09

@danielmellado danielmellado left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just some minor cosmetic nits


const (
// DashboardsPluginName is the required name for the Dashboards Plugin resource.
DashboardsPluginName = "dashboards"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: DashboardsPluginName uses a PluginName suffix while all the other constants use just Name (DistributedTracingName, TroubleshootingPanelName, MonitoringName, LoggingName). Could you rename this to DashboardsName for consistency?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good catch, I'd probably go with the PluginName suffix for all as it's more explanatory.

Comment thread test/e2e/framework/framework.go
@simonpasquier
simonpasquier force-pushed the refactor-e2e-test-diagnostic branch from 0d9726c to 8e5b262 Compare July 16, 2026 12:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/uiplugin_cluster_health_analyzer_test.go`:
- Line 91: Add the missing exported MonitoringName constant in the
pkg/apis/uiplugin/v1alpha1 package, or update the test’s uiv1.MonitoringName
reference to the existing declared identifier. Ensure the Name field in the e2e
test resolves to a valid monitoring plugin name and the package type-checks
successfully.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 76be4179-8028-4837-ac1e-f93e1684f0b2

📥 Commits

Reviewing files that changed from the base of the PR and between 0d9726c and 8e5b262.

📒 Files selected for processing (11)
  • pkg/apis/uiplugin/v1alpha1/types.go
  • test/e2e/framework/framework.go
  • test/e2e/framework/uiplugin.go
  • test/e2e/monitoring_stack_controller_test.go
  • test/e2e/observability_installer_test.go
  • test/e2e/operator_metrics_test.go
  • test/e2e/po_admission_webhook_test.go
  • test/e2e/prometheus_operator_test.go
  • test/e2e/thanos_querier_controller_test.go
  • test/e2e/uiplugin_cluster_health_analyzer_test.go
  • test/e2e/uiplugin_test.go
🚧 Files skipped from review as they are similar to previous changes (9)
  • test/e2e/operator_metrics_test.go
  • test/e2e/framework/uiplugin.go
  • test/e2e/prometheus_operator_test.go
  • test/e2e/monitoring_stack_controller_test.go
  • test/e2e/thanos_querier_controller_test.go
  • test/e2e/po_admission_webhook_test.go
  • test/e2e/framework/framework.go
  • test/e2e/uiplugin_test.go
  • pkg/apis/uiplugin/v1alpha1/types.go

Comment thread test/e2e/uiplugin_cluster_health_analyzer_test.go Outdated
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier
simonpasquier force-pushed the refactor-e2e-test-diagnostic branch from 8e5b262 to ba54eb1 Compare July 16, 2026 13:57

@danielmellado danielmellado left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danielmellado, simonpasquier

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [danielmellado,simonpasquier]

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

@openshift-merge-bot
openshift-merge-bot Bot merged commit 6a39666 into rhobs:main Jul 16, 2026
12 checks passed
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.

2 participants