Skip to content

OU-1107: ACM alerting UI with alerts and perses - #1105

Draft
etmurasaki wants to merge 4 commits into
openshift:mainfrom
etmurasaki:etmura-ou1107
Draft

OU-1107: ACM alerting UI with alerts and perses#1105
etmurasaki wants to merge 4 commits into
openshift:mainfrom
etmurasaki:etmura-ou1107

Conversation

@etmurasaki

@etmurasaki etmurasaki commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved Alerting behavior across Core Platform and Fleet Management perspectives.
    • Alert filtering, silencing, expiration, and detail-page actions now work correctly with perspective-specific alerts.
    • Corrected empty-state displays for alerting rules and silences.
    • Improved navigation and filter interactions by ensuring controls are visible before selection.
    • Fleet Management now correctly hides unsupported Incidents and Signal correlation options.
  • Enhancements
    • Enabled Incidents and Perses monitoring components for supported environments.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 28, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 28, 2026

Copy link
Copy Markdown

@etmurasaki: This pull request references OU-1107 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 task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

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.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 28, 2026
@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: etmurasaki

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:

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Walkthrough

Fleet Management and Core Platform Cypress alerting suites now use perspective-specific regression runners and alert targets. Monitoring fixtures enable additional components, while navigation, filtering, empty-state, and hidden-feature assertions are updated for the revised UI behavior.

Changes

Alerting regression coverage

Layer / File(s) Summary
Monitoring fixtures and test contracts
web/cypress/fixtures/coo/acm-install.sh, web/cypress/fixtures/monitoring/constants.ts, web/cypress/support/commands/utility-commands.ts
Monitoring fixtures enable Incidents and Perses, cluster identifiers are centralized, and podImage waits for filter controls.
Navigation, filtering, and empty-state helpers
web/cypress/views/*.ts, web/cypress/support/monitoring/04.reg_alerts_namespace.cy.ts
Page objects update scrolling, hidden Incidents checks, filter cleanup, and empty-state assertions.
Perspective-specific alert regression runner
web/cypress/support/monitoring/01.reg_alerts.cy.ts
Alert regressions accept perspective-specific alert names and namespaces and expose Core Platform and Fleet Management entrypoints.
Core Platform and Fleet Management suite wiring
web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts, web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts
End-to-end suites invoke the appropriate runners and validate Fleet Management navigation and feature visibility.

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

Suggested reviewers: peteryurkovich, davidrajnoha

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

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.
Microshift Test Compatibility ⚠️ Warning FAIL: 02.acm_alerting_ui.cy.ts calls beforeBlockACM, which applies OperatorGroup/Subscription/MultiClusterHub/UIPlugin/MultiClusterObservability APIs, with no MicroShift guard. Add a MicroShift skip/tag or runtime exutil.IsMicroShiftCluster() guard, or exclude this suite from MicroShift jobs.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: ACM alerting UI work involving alerts and Perses.
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.
Stable And Deterministic Test Names ✅ Passed All added/changed test titles are static strings or use fixed perspective names ('Administrator', 'Fleet management'); no generated data appears in titles.
Test Structure And Quality ✅ Passed PASS: The PR only changes Cypress specs/helpers, not Ginkgo tests; added timeouts and existing before()/helper patterns are consistent, with no new resource leaks or indefinite waits.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Added Cypress tests only switch perspectives and assert UI visibility; no node-counting, scheduling, failover, or other HA/multi-node assumptions found.
Topology-Aware Scheduling Compatibility ✅ Passed PR only changes Cypress UI tests and helpers; no deployment manifests, operator code, controllers, or scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed Touched files are Cypress test/support code only, and searches found no stdout/console/klog writes or process-level hooks in them.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No IPv4-only parsing, hardcoded IPv4s, or external/public internet calls found in the touched Cypress tests; they only use cluster-internal UI flows.
No-Weak-Crypto ✅ Passed No weak-crypto algorithms, custom crypto, or secret/token comparison code was added; the diff is limited to Cypress/UI tests and config fixtures.
Container-Privileges ✅ Passed Touched files are Cypress tests/helpers and an install script; no privileged:true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation:true found.
No-Sensitive-Data-In-Logs ✅ Passed No new logs exposing secrets/PII/hostnames were added; the diff only adjusts test assertions and generic helper text.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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

🧹 Nitpick comments (1)
web/cypress/support/monitoring/01.reg_alerts.cy.ts (1)

43-113: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Near-duplicate "Alerting Rules page - Filtering" test between Fleet Management and Core Platform.

testAlertsFleetManagementRegression's second it block (lines 73-112) and testAlertsCorePlatformHeaderRegression's second it block (lines 142-182) are identical apart from one extra listPage.filter.removeIndividualTag(Source.PLATFORM); call (line 146). Extracting the shared filtering flow into a single helper (parameterized by the one extra teardown step) would prevent the two copies from drifting apart over time.

♻️ Suggested extraction
function testAlertingRulesFilteringRegression(
  perspective: PerspectiveConfig,
  beforeFilters?: () => void,
) {
  it(`${perspective.name} perspective - Alerting > Alerting Rules page - Filtering`, () => {
    cy.log('2.1 use sidebar nav to go to Observe > Alerting');
    nav.tabs.switchTab('Alerting rules');
    alertingRuleListPage.shouldBeLoaded();
    beforeFilters?.();

    cy.log('2.2 clear all filters, verify filters and tags');
    // ...shared body...
    alertingRuleListPage.filter.assertNoClearAllFilters();
  });
}

Then call it with () => listPage.filter.removeIndividualTag(Source.PLATFORM) from testAlertsCorePlatformHeaderRegression and with no callback from testAlertsFleetManagementRegression.

Also applies to: 142-183

🤖 Prompt for 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.

In `@web/cypress/support/monitoring/01.reg_alerts.cy.ts` around lines 43 - 113,
Extract the duplicated Alerting Rules filtering test flow from
testAlertsFleetManagementRegression and testAlertsCorePlatformHeaderRegression
into a shared testAlertingRulesFilteringRegression helper. Parameterize the
helper with an optional beforeFilters callback, invoke it before applying
filters, and pass the Source.PLATFORM removal callback only from the Core
Platform test while leaving the Fleet Management call without one.
🤖 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 `@web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts`:
- Around line 58-69: Add cy.closeOnboardingModalIfPresent() after
cy.switchPerspective('Fleet management') in the “Visual validation for features
that should not be displayed under Fleet management perspective” test, before
navigating with nav.sidenav.clickNavLink(...), so the test works independently
when the onboarding modal is present.

---

Nitpick comments:
In `@web/cypress/support/monitoring/01.reg_alerts.cy.ts`:
- Around line 43-113: Extract the duplicated Alerting Rules filtering test flow
from testAlertsFleetManagementRegression and
testAlertsCorePlatformHeaderRegression into a shared
testAlertingRulesFilteringRegression helper. Parameterize the helper with an
optional beforeFilters callback, invoke it before applying filters, and pass the
Source.PLATFORM removal callback only from the Core Platform test while leaving
the Fleet Management call without one.
🪄 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), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 4b8b056f-70a6-4cd9-8420-8be26cad4f42

📥 Commits

Reviewing files that changed from the base of the PR and between b73be6f and 49ec998.

📒 Files selected for processing (12)
  • web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts
  • web/cypress/e2e/monitoring/regression/01.reg_alerts_admin.cy.ts
  • web/cypress/fixtures/coo/acm-install.sh
  • web/cypress/fixtures/monitoring/constants.ts
  • web/cypress/support/commands/utility-commands.ts
  • web/cypress/support/monitoring/01.reg_alerts.cy.ts
  • web/cypress/support/monitoring/04.reg_alerts_namespace.cy.ts
  • web/cypress/views/alerting-rule-list-page.ts
  • web/cypress/views/incidents-page.ts
  • web/cypress/views/list-page.ts
  • web/cypress/views/nav.ts
  • web/cypress/views/silences-list-page.ts
💤 Files with no reviewable changes (1)
  • web/cypress/views/silences-list-page.ts

Comment on lines +58 to +69
it('Visual validation for features that should not be displayed under Fleet management perspective', () => {
// check Incidents page is not displayed under Fleet management perspective
cy.log('Incidents page should not be displayed under Fleet management perspective');
cy.switchPerspective('Fleet management');
nav.sidenav.clickNavLink(['Observe', 'Alerting']);
commonPages.titleShouldHaveText('Alerting');
incidentsPage.incidentsPageShouldNotBeVisible();

// check Signal correlation option is not displayed under Fleet management perspective
cy.log('Signal correlation option should not be displayed under Fleet management perspective');
troubleshootingPanelPage.signalCorrelationShouldNotBeVisible();
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Potential flakiness: onboarding modal not dismissed before navigating in this new test.

This test calls cy.switchPerspective('Fleet management') again but, unlike the first test (line 42), never calls cy.closeOnboardingModalIfPresent(). If this test executes without the preceding test having already dismissed the modal (e.g. run in isolation, retried, or split across CI shards), the modal could still be open and block nav.sidenav.clickNavLink(...).

🔧 Suggested fix
     cy.switchPerspective('Fleet management');
+    cy.closeOnboardingModalIfPresent();
     nav.sidenav.clickNavLink(['Observe', 'Alerting']);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
it('Visual validation for features that should not be displayed under Fleet management perspective', () => {
// check Incidents page is not displayed under Fleet management perspective
cy.log('Incidents page should not be displayed under Fleet management perspective');
cy.switchPerspective('Fleet management');
nav.sidenav.clickNavLink(['Observe', 'Alerting']);
commonPages.titleShouldHaveText('Alerting');
incidentsPage.incidentsPageShouldNotBeVisible();
// check Signal correlation option is not displayed under Fleet management perspective
cy.log('Signal correlation option should not be displayed under Fleet management perspective');
troubleshootingPanelPage.signalCorrelationShouldNotBeVisible();
});
it('Visual validation for features that should not be displayed under Fleet management perspective', () => {
// check Incidents page is not displayed under Fleet management perspective
cy.log('Incidents page should not be displayed under Fleet management perspective');
cy.switchPerspective('Fleet management');
cy.closeOnboardingModalIfPresent();
nav.sidenav.clickNavLink(['Observe', 'Alerting']);
commonPages.titleShouldHaveText('Alerting');
incidentsPage.incidentsPageShouldNotBeVisible();
// check Signal correlation option is not displayed under Fleet management perspective
cy.log('Signal correlation option should not be displayed under Fleet management perspective');
troubleshootingPanelPage.signalCorrelationShouldNotBeVisible();
});
🤖 Prompt for 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.

In `@web/cypress/e2e/coo/02.acm_alerting_ui.cy.ts` around lines 58 - 69, Add
cy.closeOnboardingModalIfPresent() after cy.switchPerspective('Fleet
management') in the “Visual validation for features that should not be displayed
under Fleet management perspective” test, before navigating with
nav.sidenav.clickNavLink(...), so the test works independently when the
onboarding modal is present.

@etmurasaki

Copy link
Copy Markdown
Contributor Author

/test e2e-monitoring

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@etmurasaki: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants