Skip to content

TRT-2273: Show Regressions for Test Analysis#3775

Open
openshift-trt-agent[bot] wants to merge 3 commits into
openshift:mainfrom
openshift-trt:trt-2273
Open

TRT-2273: Show Regressions for Test Analysis#3775
openshift-trt-agent[bot] wants to merge 3 commits into
openshift:mainfrom
openshift-trt:trt-2273

Conversation

@openshift-trt-agent

@openshift-trt-agent openshift-trt-agent Bot commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • Adds an "Active Regressions" section to the Issues card on the Test Analysis page, showing Component Readiness regressions detected for the current test
  • Backend: adds test_name query parameter to GET /api/component_readiness/regressions for efficient server-side filtering
  • Frontend: new TestRegressionsTable component that displays regression ID, variant combination, regressed since, last failure, and triage status (with links to triage/regression detail pages)
  • Honors variant filters applied on the Test Analysis page (e.g., excluding arm64 will hide arm64 regressions)

Jira: https://issues.redhat.com/browse/TRT-2273

Screenshots

Full Test Analysis page with Active Regressions

Test Analysis page with Active Regressions section

Variant filtering applied (arm64 excluded)

Regressions table with variant filter excluding arm64

Test plan

  • Go unit tests pass (gotestsum ./pkg/... - 13773 tests)
  • Frontend Jest tests pass (CI=true npm test)
  • Go linter passes (golangci-lint run ./... - 0 issues)
  • Frontend ESLint passes (npx eslint .)
  • Verified test with active regressions shows table with correct data (3 regressions for sig-etcd test)
  • Verified test without regressions shows "No active regressions found"
  • Verified variant filters correctly filter the regressions table (excluding arm64 removes regression add web based reporting #2)
  • Verified regression ID links to Component Readiness regression detail page

Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added an Active Regressions section to test analysis pages.
    • View regression details, affected variants, timing, and triage status.
    • Filter regression results by release, test name, and variant criteria.
    • Added support for the test_name filter to the regressions API.
  • Bug Fixes

    • Regression listings now correctly apply the selected test name filter.

Add an Active Regressions section to the Issues card on the Test Analysis
page. The section fetches Component Readiness regressions for the current
test and release, displays them in a table with variant, timing, and triage
info, and filters by any variant filters applied on the page.

Backend: add test_name query parameter to the GET
/api/component_readiness/regressions endpoint for server-side filtering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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 openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jul 14, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 14, 2026

Copy link
Copy Markdown

@openshift-trt-agent[bot]: This pull request references TRT-2273 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 "Active Regressions" section to the Issues card on the Test Analysis page, showing Component Readiness regressions detected for the current test
  • Backend: adds test_name query parameter to GET /api/component_readiness/regressions for efficient server-side filtering
  • Frontend: new TestRegressionsTable component that displays regression ID, variant combination, regressed since, last failure, and triage status (with links to triage/regression detail pages)
  • Honors variant filters applied on the Test Analysis page (e.g., excluding arm64 will hide arm64 regressions)

Jira: https://issues.redhat.com/browse/TRT-2273

Screenshots

Full Test Analysis page with Active Regressions

Test Analysis page with Active Regressions section

Variant filtering applied (arm64 excluded)

Regressions table with variant filter excluding arm64

Test plan

  • Go unit tests pass (gotestsum ./pkg/... - 13773 tests)
  • Frontend Jest tests pass (CI=true npm test)
  • Go linter passes (golangci-lint run ./... - 0 issues)
  • Frontend ESLint passes (npx eslint .)
  • Verified test with active regressions shows table with correct data (3 regressions for sig-etcd test)
  • Verified test without regressions shows "No active regressions found"
  • Verified variant filters correctly filter the regressions table (excluding arm64 removes regression add web based reporting #2)
  • Verified regression ID links to Component Readiness regression detail page

Generated with Claude Code

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 14, 2026
@openshift-ci openshift-ci Bot requested review from deads2k and dgoodwin July 14, 2026 21:03
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: openshift-trt-agent[bot]
Once this PR has been reviewed and has the lgtm label, please assign neisw 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

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 14, 2026
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Hi @openshift-trt-agent[bot]. Thanks for your PR.

I'm waiting for a openshift 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.

Comment thread pkg/api/componentreadiness/triage.go Outdated
Comment on lines 310 to 316
func ListRegressions(dbc *db.DB, release, testName string, views []crview.View, releases []v1.Release, crTimeRoundingFactor, crTimeRoundingOffset time.Duration, req *http.Request) ([]models.TestRegression, error) {
var regressions []models.TestRegression
var err error
regressions, err = query.ListRegressions(dbc, release)
regressions, err = query.ListRegressions(dbc, release, testName)
if err != nil {
return nil, err
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd rather not see this reused in this manner. We would be better off with a GetRegressionForTest function that was only (currently) used for this purpose.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Created a dedicated GetRegressionsForTest function in both triage_queries.go and triage.go, and reverted ListRegressions back to its original signature. The handler in server.go now dispatches to GetRegressionsForTest when the test parameter is provided, and to ListRegressions otherwise.

Comment thread pkg/util/param/param.go Outdated
"job": nameRegexp,
"job_name": nameRegexp,
"test": regexp.MustCompile(`^.+$`), // tests can be anything, so always parameterize in sql
"test_name": regexp.MustCompile(`^.+$`), // test names can be anything, always parameterize in sql

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can't we use "test" here for this? how is that any different? what would "test" be if not a test name?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good point. Switched to using the existing test parameter instead of adding test_name. Removed the test_name entry from param.go.

Comment on lines +150 to +170
<TableCell>
{triaged ? (
regression.triages.map((t) => (
<Chip
key={t.id}
label={
t.url ? t.url.split('/').pop() : `Triage #${t.id}`
}
component={Link}
to={`/sippy-ng/component_readiness/triages/${t.id}`}
clickable
size="small"
color="primary"
variant="outlined"
sx={{ marginRight: 0.5 }}
/>
))
) : (
<Chip label="Untriaged" size="small" color="warning" />
)}
</TableCell>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Multiple Triages can exist for a single regression. I don't think we should surface triages here at all as it just makes things too complex.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed. Removed the Triage column entirely from the table.

@smg247

smg247 commented Jul 14, 2026

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

The component readiness regressions API now supports exact test_name filtering. The test analysis page adds an Active Regressions section that fetches, filters, and displays regression records with triage details.

Changes

Component readiness regressions

Layer / File(s) Summary
Test-name regression filtering
pkg/db/query/triage_queries.go, pkg/api/componentreadiness/triage.go, pkg/sippyserver/server.go, pkg/util/param/param.go
The API validates and forwards test_name, and the database query conditionally filters regressions by exact test name while preserving existing behavior.
Active regressions table
sippy-ng/src/tests/TestRegressionsTable.js
A new table fetches regressions, applies active-state and variant filters, handles loading and errors, and renders regression, timestamp, and triage information.
Test analysis integration
sippy-ng/src/tests/TestAnalysis.js
The Test Analysis page renders the Active Regressions section with release, test name, and variant filter inputs.

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

Sequence Diagram(s)

sequenceDiagram
  participant TestAnalysis
  participant TestRegressionsTable
  participant ComponentReadinessAPI
  participant RegressionQuery
  TestAnalysis->>TestRegressionsTable: pass release, testName, filterModel
  TestRegressionsTable->>ComponentReadinessAPI: request regressions
  ComponentReadinessAPI->>RegressionQuery: filter by release and test_name
  RegressionQuery-->>ComponentReadinessAPI: return regressions
  ComponentReadinessAPI-->>TestRegressionsTable: return regression records
  TestRegressionsTable-->>TestAnalysis: render active regressions
Loading

Suggested reviewers: deads2k, dgoodwin, sosiouxme

🚥 Pre-merge checks | ✅ 18 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

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.
Test Coverage For New Features ⚠️ Warning ListRegressions and the new TestRegressionsTable/TestAnalysis regression UI have no corresponding tests; only unrelated helpers are covered. Add Go tests for the new test_name filter and endpoint wiring, plus Jest coverage for TestRegressionsTable/TestAnalysis filtering and empty/error states.
Single Responsibility And Clear Naming ❓ Inconclusive Need closer inspection of the new component and handler bodies to judge whether their responsibilities are too broad. Inspect the new TestRegressionsTable component and the regression handler path for any overly broad responsibilities or ambiguous names.
✅ Passed checks (18 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: showing regressions in Test Analysis.
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 The touched Go code adds test_name plumbing without introducing ignored errors, panics, or unsafe nil dereferences; errors still propagate on failure.
Sql Injection Prevention ✅ Passed New test_name/release filters use GORM placeholders (?) and no user input is concatenated into SQL in the changed query path.
Excessive Css In React Should Use Styles ✅ Passed New React styles are minimal (1-2 props each); no large inline style object was added, so useStyles/styled isn’t needed.
Feature Documentation ✅ Passed No docs/features page covers Test Analysis regressions; the only feature doc is unrelated, so no docs update was needed.
Stable And Deterministic Test Names ✅ Passed No changed Go test files or Ginkgo titles were introduced; the diff only updates backend handlers, a param whitelist, and frontend React components.
Test Structure And Quality ✅ Passed No Ginkgo test code was changed in this PR; the diff only updates API/query/server code and frontend React files, so the checklist is N/A.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the diff only touches backend/query code and React UI components, with no MicroShift-unsupported APIs or assumptions.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds backend/frontend app code only; diff shows no new Ginkgo e2e tests or multi-node assumptions, so SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed No deployment manifests, operators, or controllers were modified; changes are API/query/UI only and add no topology or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed No stdout writes were added in process-level code; searches found only a ResponseWriter fmt.Fprintf and a harmless init assignment, with no main/TestMain/init logging changes in touched files.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the touched files are API/frontend code, and I found no IPv4-only literals or external connectivity requirements.
No-Weak-Crypto ✅ Passed Touched files only add query filtering/UI table code; no MD5/SHA1/DES/RC4/ECB/custom crypto or secret comparisons were found.
Container-Privileges ✅ Passed PR only changes Go/JS app code; no K8s/container manifests were modified and no privileged/hostPID/hostNetwork/hostIPC/allowPrivilegeEscalation/SYS_ADMIN settings were found.
No-Sensitive-Data-In-Logs ✅ Passed No new log statements expose secrets or PII; the added code only threads test_name through query handling and generic errors.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

- Create dedicated GetRegressionsForTest function instead of modifying
  ListRegressions, keeping the existing function's contract unchanged
- Use existing "test" query parameter instead of adding "test_name"
- Remove Triage column from TestRegressionsTable to avoid complexity
  from multiple triages per regression

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@smg247

smg247 commented Jul 14, 2026

Copy link
Copy Markdown
Member

The Implementation is entirely untested. We need to add the proper unit and e2e tests. No frontend tests are necessary.

Test the new `test` query parameter on the /api/component_readiness/regressions
endpoint that was added to support the Test Analysis regressions widget.
Covers filtering by test name with and without release, and verifying
empty results for non-existent test names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-trt-agent

Copy link
Copy Markdown
Author

Added e2e tests for the test query parameter on the regressions endpoint (commit f466df8):

  • "filter regressions by test name": Creates a regression with a unique test name, verifies the ?release=...&test=... filter returns exactly that regression, and confirms a non-existent test name returns an empty list.
  • "filter regressions by test name without release": Verifies the ?test=... filter works without specifying a release.

Per project testing conventions, the DB query layer (GetRegressionsForTest in triage_queries.go) and the thin API wrapper (GetRegressionsForTest in triage.go) are covered through e2e tests rather than unit tests with mocked storage clients. The HATEOAS link injection called by the API wrapper already has dedicated unit tests in triage_test.go.

@smg247

smg247 commented Jul 14, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 14, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@openshift-trt-agent[bot]: 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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