Skip to content

SREP-4417: Config-driven overview customization for rosa-stage#3465

Open
dustman9000 wants to merge 2 commits intoopenshift:mainfrom
dustman9000:srep-4403/rosa-stage-overview-improvements
Open

SREP-4417: Config-driven overview customization for rosa-stage#3465
dustman9000 wants to merge 2 commits intoopenshift:mainfrom
dustman9000:srep-4403/rosa-stage-overview-improvements

Conversation

@dustman9000
Copy link
Copy Markdown
Member

@dustman9000 dustman9000 commented Apr 23, 2026

Summary

Jira: https://redhat.atlassian.net/browse/SREP-4417

  • Adds an overview config block to ReleaseConfig so any release can customize its overview page via openshift-customizations.yaml
  • For rosa-stage, widens "New Test Failures" windows (48h/168h vs 24h/72h) to catch regressions in nightly-cadence jobs
  • Adds a "Top Failing Tests (7d)" section showing all test failures without the "new only" filter
  • Enables multi-version install test queries (both old synthetic and new-style names) for releases spanning multiple OCP versions
  • Overview config flows from YAML -> /api/health response -> React frontend with no hardcoded release names

Config example

rosa-stage:
  overview:
    multiVersionInstallTests: true
    recentFailuresPeriod: "48h"
    recentFailuresPreviousPeriod: "168h"
    topFailingTestsPeriod: "168h"

Test plan

  • Verify rosa-stage overview page shows wider "New Test Failures" window
  • Verify "Top Failing Tests (7d)" section appears on rosa-stage overview
  • Verify other release overview pages (4.17, aro-stage) are unchanged
  • Verify /api/health?release=rosa-stage response includes overview field
  • Verify /api/health?release=4.17 response does not include overview field

Summary by CodeRabbit

  • New Features

    • Added multi-version install test tracking to release overview.
    • Introduced configurable time periods for analyzing recent test failures.
    • New "Top Failing Tests" section displays highest-impact failures within a configurable time window.
  • Configuration

    • New overview configuration section enables per-release customization of failure analysis lookback periods.

Adds an `overview` config block to ReleaseConfig so that any release
can customize its overview page display via openshift-customizations.yaml.

For rosa-stage, this enables:
- Multi-version install test queries (both old synthetic and new-style names)
- Wider time windows for "New Test Failures" (48h/168h vs 24h/72h)
- A "Top Failing Tests" section showing all failures in the past 7 days

The overview config flows from the YAML config through the /api/health
endpoint to the React frontend, so no release names are hardcoded.
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 23, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 23, 2026

@dustman9000: This pull request references SREP-4403 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Adds an overview config block to ReleaseConfig so any release can customize its overview page via openshift-customizations.yaml
  • For rosa-stage, widens "New Test Failures" windows (48h/168h vs 24h/72h) to catch regressions in nightly-cadence jobs
  • Adds a "Top Failing Tests (7d)" section showing all test failures without the "new only" filter
  • Enables multi-version install test queries (both old synthetic and new-style names) for releases spanning multiple OCP versions
  • Overview config flows from YAML -> /api/health response -> React frontend with no hardcoded release names

Config example

rosa-stage:
 overview:
   multiVersionInstallTests: true
   recentFailuresPeriod: "48h"
   recentFailuresPreviousPeriod: "168h"
   topFailingTestsPeriod: "168h"

Test plan

  • Verify rosa-stage overview page shows wider "New Test Failures" window
  • Verify "Top Failing Tests (7d)" section appears on rosa-stage overview
  • Verify other release overview pages (4.17, aro-stage) are unchanged
  • Verify /api/health?release=rosa-stage response includes overview field
  • Verify /api/health?release=4.17 response does not include overview field

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 warnings, 2 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Coverage For New Features ⚠️ Warning Modified functions lack adequate test coverage. PrintOverallReleaseHealthFromDB, jsonHealthReportFromDB, and React components have no corresponding tests despite significant new logic. Add unit tests for PrintOverallReleaseHealthFromDB with overviewCfg parameter variations, add tests for jsonHealthReportFromDB, and add React component tests for conditional rendering logic.
Stable And Deterministic Test Names ❓ Inconclusive Repository does not contain Ginkgo test definitions with dynamic test names. Standard Go tests appear to use stable naming conventions. Verify whether the repository uses Ginkgo testing framework and confirm all Ginkgo test titles use stable, non-dynamic values.
Test Structure And Quality ❓ Inconclusive Unable to execute shell commands to verify the health_test.go file and testing framework configuration. Please provide the content of pkg/api/health_test.go and go.mod to verify the testing implementation.
✅ 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 clearly and specifically summarizes the main change: adding config-driven overview customization for rosa-stage, which is the primary objective of the changeset.
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.
Go Error Handling ✅ Passed Pull request demonstrates proper Go error handling with nil checks before dereferencing, no ignored errors, no panic calls, and appropriate error checking with logging throughout.
Sql Injection Prevention ✅ Passed Database methods receive test name parameters safely through function arguments rather than SQL string concatenation. The sqlc library generates parameterized queries with placeholders, preventing SQL injection attacks.
Excessive Css In React Should Use Styles ✅ Passed React components properly utilize useStyles hook pattern for styling with comprehensive definitions and only acceptable dynamic inline styles.
Single Responsibility And Clear Naming ✅ Passed PR demonstrates strong adherence to single responsibility and clear naming principles with well-focused struct fields and appropriate package structure organization.
Microshift Test Compatibility ✅ Passed This PR does not introduce any Ginkgo e2e tests. The only test added is a standard Go unit test using the testing package, not Ginkgo framework.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not introduce any new Ginkgo e2e tests. Changes are limited to configuration files, API type definitions, backend health reporting logic, frontend React components, and a standard Go unit test.
Topology-Aware Scheduling Compatibility ✅ Passed Sippy is a test health analysis tool for OpenShift CI consisting of configuration files, Go endpoints, type definitions, React components, and unit tests. No Kubernetes deployment manifests, Pod specifications, or scheduling constructs are introduced or modified.
Ote Binary Stdout Contract ✅ Passed The sippy project is a web server application providing REST APIs, not an OTE test binary. All HTTP responses correctly use http.ResponseWriter, and no process-level stdout writes are introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR contains only configuration changes, API modifications, and a Go unit test. No new Ginkgo e2e tests introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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

@openshift-ci openshift-ci Bot requested review from dgoodwin and stbenjam April 23, 2026 19:43
@dustman9000 dustman9000 changed the title SREP-4403: Config-driven overview customization for rosa-stage SREP-4417: Config-driven overview customization for rosa-stage Apr 23, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 23, 2026

@dustman9000: This pull request references SREP-4417 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 "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Jira: https://redhat.atlassian.net/browse/SREP-4417

  • Adds an overview config block to ReleaseConfig so any release can customize its overview page via openshift-customizations.yaml
  • For rosa-stage, widens "New Test Failures" windows (48h/168h vs 24h/72h) to catch regressions in nightly-cadence jobs
  • Adds a "Top Failing Tests (7d)" section showing all test failures without the "new only" filter
  • Enables multi-version install test queries (both old synthetic and new-style names) for releases spanning multiple OCP versions
  • Overview config flows from YAML -> /api/health response -> React frontend with no hardcoded release names

Config example

rosa-stage:
 overview:
   multiVersionInstallTests: true
   recentFailuresPeriod: "48h"
   recentFailuresPreviousPeriod: "168h"
   topFailingTestsPeriod: "168h"

Test plan

  • Verify rosa-stage overview page shows wider "New Test Failures" window
  • Verify "Top Failing Tests (7d)" section appears on rosa-stage overview
  • Verify other release overview pages (4.17, aro-stage) are unchanged
  • Verify /api/health?release=rosa-stage response includes overview field
  • Verify /api/health?release=4.17 response does not include overview field

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/api/health.go (1)

78-99: Multi-version install tests logic is correct but consider adding a brief comment.

The logic correctly inverts the test name selection based on useNewInstallTest(release) and picks whichever variant has more CurrentRuns. This handles releases spanning OCP version boundaries well.

Consider adding a brief inline comment explaining why we query both and compare, as the logic may not be immediately obvious to future maintainers.

📝 Optional: Add clarifying comment
 	// When configured, try both old-style synthetic and new-style install test
 	// names and keep whichever has more data. Useful for releases that span
 	// multiple OCP versions.
 	if overviewCfg != nil && overviewCfg.MultiVersionInstallTests {
+		// Primary names were set above based on useNewInstallTest(); here we try
+		// the opposite naming scheme and keep the result with more runs.
 		altInfra := testidentification.NewInfrastructureTestName
 		altInstall := testidentification.NewInstallTestName
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/api/health.go` around lines 78 - 99, Add a brief inline comment above the
MultiVersionInstallTests block explaining that when
overviewCfg.MultiVersionInstallTests is enabled we query both old and new test
name variants (using
testidentification.NewInfrastructureTestName/NewInstallTestName vs
InfrastructureTestName/InstallTestName chosen by useNewInstallTest(release)) and
then pick the indicator with the higher CurrentRuns (via
query.TestReportExcludeVariants) so releases spanning OCP version boundaries use
the most-populated metric for indicators["infrastructure"] and
indicators["install"]; place the comment immediately before the if
overviewCfg... block to make the rationale obvious to future maintainers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@pkg/api/health.go`:
- Around line 78-99: Add a brief inline comment above the
MultiVersionInstallTests block explaining that when
overviewCfg.MultiVersionInstallTests is enabled we query both old and new test
name variants (using
testidentification.NewInfrastructureTestName/NewInstallTestName vs
InfrastructureTestName/InstallTestName chosen by useNewInstallTest(release)) and
then pick the indicator with the higher CurrentRuns (via
query.TestReportExcludeVariants) so releases spanning OCP version boundaries use
the most-populated metric for indicators["infrastructure"] and
indicators["install"]; place the comment immediately before the if
overviewCfg... block to make the rationale obvious to future maintainers.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b983e5c5-049f-4e10-ab72-09e52dfc23ef

📥 Commits

Reviewing files that changed from the base of the PR and between 97abf3d and a5382eb.

📒 Files selected for processing (8)
  • config/openshift-customizations.yaml
  • config/openshift.yaml
  • pkg/api/health.go
  • pkg/apis/api/types.go
  • pkg/apis/config/v1/types.go
  • pkg/sippyserver/server.go
  • sippy-ng/src/releases/RecentTestFailures.js
  • sippy-ng/src/releases/ReleaseOverview.js

@openshift-merge-bot openshift-merge-bot Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Apr 23, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 23, 2026

@coderabbitai[bot]: changing LGTM is restricted to collaborators

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 kubernetes-sigs/prow repository.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: coderabbitai[bot], dustman9000
Once this PR has been reviewed and has the lgtm label, please assign petr-muller 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

- Fix prettier violation in ReleaseOverview.js (single-line expression)
- Add inline comment explaining multi-version install test query logic
- Add unit tests for useNewInstallTest covering versioned and
  non-versioned release names
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/api/health.go (1)

58-90: Avoid duplicate useNewInstallTest(release) calls in the same path.

Line 58 and Line 87 call the same helper with identical args. Cache once and reuse for both primary and alternate test-name selection.

♻️ Proposed refactor
  infraTestName := testidentification.InfrastructureTestName
  installTestName := testidentification.InstallTestName
- if useNewInstallTest(release) {
+ useNewInstall := useNewInstallTest(release)
+ if useNewInstall {
    infraTestName = testidentification.NewInfrastructureTestName
    installTestName = testidentification.NewInstallTestName
  }
...
  if overviewCfg != nil && overviewCfg.MultiVersionInstallTests {
    altInfra := testidentification.NewInfrastructureTestName
    altInstall := testidentification.NewInstallTestName
-   if useNewInstallTest(release) {
+   if useNewInstall {
      altInfra = testidentification.InfrastructureTestName
      altInstall = testidentification.InstallTestName
    }

As per coding guidelines, "Avoid calling the same utility function multiple times with identical arguments in the same code path."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/api/health.go` around lines 58 - 90, Cache the boolean result of
useNewInstallTest(release) in a local variable (e.g., useNew :=
useNewInstallTest(release)) and replace the duplicate calls: use useNew when
deciding infraTestName and installTestName (where infraTestName and
installTestName are set) and again when choosing altInfra and altInstall in the
overviewCfg.MultiVersionInstallTests branch; this removes the duplicate function
calls while preserving the existing logic and identifiers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@pkg/api/health.go`:
- Around line 58-90: Cache the boolean result of useNewInstallTest(release) in a
local variable (e.g., useNew := useNewInstallTest(release)) and replace the
duplicate calls: use useNew when deciding infraTestName and installTestName
(where infraTestName and installTestName are set) and again when choosing
altInfra and altInstall in the overviewCfg.MultiVersionInstallTests branch; this
removes the duplicate function calls while preserving the existing logic and
identifiers.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b1cb2f00-5f55-4135-936f-f91ae18367f6

📥 Commits

Reviewing files that changed from the base of the PR and between a5382eb and f320aa5.

📒 Files selected for processing (3)
  • pkg/api/health.go
  • pkg/api/health_test.go
  • sippy-ng/src/releases/ReleaseOverview.js

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 23, 2026

@dustman9000: 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

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants