Skip to content

Display lifecycle indicator on Tests and Test Analysis pages - #3875

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
mstaeble:worktree-TRT-3870-lifecycle-display
Aug 5, 2026
Merged

Display lifecycle indicator on Tests and Test Analysis pages#3875
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
mstaeble:worktree-TRT-3870-lifecycle-display

Conversation

@mstaeble

@mstaeble mstaeble commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add lifecycles field to the test API response using array_agg(DISTINCT lifecycle) in both collapsed and uncollapsed queries
  • Display an informing indicator on the Tests page: filled icon for fully-informing tests, outlined icon for mixed-lifecycle tests
  • Show a chip with matching label and variant (filled/outlined) on the Test Analysis page
  • Add integration tests covering the new field for both query paths

Screenshots

Test with all runs informing

Screenshot 2026-08-04 at 10 02 19 PM

Test with some but not all runs informing

Screenshot 2026-08-04 at 10 02 13 PM

Test Analysis for test with all runs informing

Screenshot 2026-08-04 at 10 09 31 PM

Test Analysis for test with some but not all runs informing

Screenshot 2026-08-04 at 10 09 02 PM

Badge in table in Test Analysis page

Screenshot 2026-08-04 at 10 09 13 PM

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Test reports now display lifecycle information, including “Informing” and “Contains informing” indicators.
    • Lifecycle details are available in test analysis, test tables, JSON responses, and BigQuery data.
    • Collapsed and uncollapsed reports now preserve and aggregate lifecycle values.
  • Bug Fixes

    • Improved lifecycle filtering and reporting across test variants and jobs.

@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

Copy link
Copy Markdown

@mstaeble: No Jira issue with key TRT-3870 exists in the tracker at https://redhat.atlassian.net.
Once a valid jira issue is referenced in the title of this pull request, request a refresh with /jira refresh.

Details

In response to this:

Summary

  • Add lifecycles field to the test API response using array_agg(DISTINCT lifecycle) in both collapsed and uncollapsed queries
  • Display an informing indicator on the Tests page: filled icon for fully-informing tests, outlined icon for mixed-lifecycle tests
  • Show a chip with matching label and variant (filled/outlined) on the Test Analysis page
  • Add integration tests covering the new field for both query paths

Test plan

  • Integration tests pass for collapsed report lifecycles (blocking-only, mixed, filtered)
  • Integration tests pass for uncollapsed report lifecycles (blocking-only, mixed, filtered)
  • Verify informing icon appears next to test names on the Tests page
  • Verify chip appears in the hero card on the Test Analysis page
  • Verify filled vs outlined distinction for fully-informing vs contains-informing

🤖 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 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 Aug 5, 2026
@openshift-ci

openshift-ci Bot commented Aug 5, 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@mstaeble, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 27b8bcb0-aea5-4550-9072-6ea1834d036e

📥 Commits

Reviewing files that changed from the base of the PR and between 59a59fe and cce8e9a.

📒 Files selected for processing (7)
  • pkg/api/tests.go
  • pkg/apis/api/types.go
  • pkg/db/query/cumulative_query.go
  • pkg/db/query/test_queries.go
  • sippy-ng/src/tests/TestAnalysis.jsx
  • sippy-ng/src/tests/TestTable.jsx
  • test/integration/tests_report_test.go

Walkthrough

Test report APIs and queries now expose aggregated lifecycle metadata. Integration tests cover collapsed and uncollapsed reports. Test views display informing lifecycle indicators.

Changes

Lifecycle reporting

Layer / File(s) Summary
Lifecycle data contracts and aggregation
pkg/apis/api/types.go, pkg/api/tests.go, pkg/db/query/*
API types expose lifecycle arrays. Collapsed and uncollapsed queries aggregate distinct lifecycle values and include them in report results.
Lifecycle report validation
test/integration/tests_report_test.go
Integration tests verify lifecycle aggregation, variant combinations, and lifecycle filtering for collapsed and uncollapsed reports.
Informing lifecycle indicators
sippy-ng/src/tests/TestAnalysis.jsx, sippy-ng/src/tests/TestTable.jsx
Test analysis and test table views show informing lifecycle chips and icons for exclusive and mixed lifecycle values.

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

Sequence Diagram(s)

sequenceDiagram
  participant ReportQuery
  participant TestReportAPI
  participant TestTable
  ReportQuery->>ReportQuery: Aggregate distinct lifecycle values
  ReportQuery->>TestReportAPI: Return lifecycles in test metadata
  TestReportAPI->>TestTable: Provide lifecycle arrays
  TestTable->>TestTable: Render informing lifecycle indicator
Loading

Possibly related PRs

Suggested reviewers: smg247

🚥 Pre-merge checks | ✅ 19 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Test Coverage For New Features ⚠️ Warning Integration tests cover both Go query paths, but new TestTable and TestAnalysis lifecycle logic has no frontend tests despite the active Vitest setup. Add component tests for informing-only, mixed, and non-informing cases on both pages; add Go tests for lifecycle array access and metadata behavior.
Feature Documentation ⚠️ Warning The PR adds lifecycles to /api/tests, but pkg/api/README.md:471 still says lifecycle is not returned; docs/features/ has no test-report feature document. Update the /api/tests response documentation to describe lifecycles, and add or update a relevant document under docs/features/ for the lifecycle indicators.
✅ Passed checks (19 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 Go changes add no new ignored errors, panic calls, or unsafe pointer dereferences; new test errors are checked with require.NoError.
Sql Injection Prevention ✅ Passed The PR adds only static SQL expressions and column names; lifecycle, release, date, name, and variant values remain bound through GORM placeholders.
Excessive Css In React Should Use Styles ✅ Passed The added JSX styles are small: two properties for the table icon, three for the name wrapper, and one dynamic margin for the chip; no new extensive inline style object exists.
Single Responsibility And Clear Naming ✅ Passed New names are specific and lifecycle-focused (Lifecycles, lifecycleIcon, and lifecycle test names); no new package, struct, or generic method was added. The large Test structs predate this commit.
Stable And Deterministic Test Names ✅ Passed Changed tests use static Go test and t.Run titles; no interpolation of pod, namespace, node, timestamp, IP, UUID, or other runtime values appears.
Test Structure And Quality ✅ Passed The affected tests use Go testing with testify, not Ginkgo; they perform database-only checks, use t.Cleanup via NewTestDB, and contain no cluster waits or Eventually calls.
Microshift Test Compatibility ✅ Passed The PR adds standard Go integration tests with testing.T, not Ginkgo e2e tests; scans found no MicroShift-unsupported OpenShift APIs, namespaces, or assumptions.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds only standard Go testing database integration tests; it adds no Ginkgo e2e tests and makes no multi-node or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The patch changes only Go query/API code, React UI, and integration tests; it adds no manifests, controllers, workloads, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR adds no OTE binary or process-level entry point; added-line and structural scans found no stdout, klog, or logging writes in changed files.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR adds standard testing integration tests in test/integration/tests_report_test.go, not Ginkgo e2e tests; added lines contain no IPv4 literals or external network access.
No-Weak-Crypto ✅ Passed The PR adds lifecycle aggregation, API fields, UI indicators, and tests only; added-line, import, and AST searches found no weak crypto, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The PR changes only Go, JSX, and integration-test files. The diff adds no container/Kubernetes manifests or privilege settings; existing contexts use non-privileged settings and non-root runtime us...
No-Sensitive-Data-In-Logs ✅ Passed The diff adds no logging calls or sensitive-data output. New lifecycle values are queried and returned to the API/UI, while existing logs are unchanged.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: displaying lifecycle indicators on the Tests and Test Analysis pages.
✨ 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.

@openshift-ci-robot

Copy link
Copy Markdown

@mstaeble: No Jira issue with key TRT-3870 exists in the tracker at https://redhat.atlassian.net.
Once a valid jira issue is referenced in the title of this pull request, request a refresh with /jira refresh.

Details

In response to this:

Summary

  • Add lifecycles field to the test API response using array_agg(DISTINCT lifecycle) in both collapsed and uncollapsed queries
  • Display an informing indicator on the Tests page: filled icon for fully-informing tests, outlined icon for mixed-lifecycle tests
  • Show a chip with matching label and variant (filled/outlined) on the Test Analysis page
  • Add integration tests covering the new field for both query paths

Test plan

  • Integration tests pass for collapsed report lifecycles (blocking-only, mixed, filtered)
  • Integration tests pass for uncollapsed report lifecycles (blocking-only, mixed, filtered)
  • Verify informing icon appears next to test names on the Tests page
  • Verify chip appears in the hero card on the Test Analysis page
  • Verify filled vs outlined distinction for fully-informing vs contains-informing

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

  • Test reports now display lifecycle information, including “Informing” and “Contains informing” indicators.

  • Lifecycle details are available in test analysis, test tables, JSON responses, and BigQuery data.

  • Collapsed and uncollapsed reports now preserve and aggregate lifecycle values.

  • Bug Fixes

  • Improved lifecycle filtering and reporting across test variants and jobs.

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 coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
sippy-ng/src/tests/TestTable.jsx (1)

499-545: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add frontend coverage for lifecycle indicators.

Add tests for absent, exclusively informing, and mixed lifecycle arrays. Verify the table icon and analysis chip labels and variants.

  • sippy-ng/src/tests/TestTable.jsx#L499-L545: test no icon, Informing, and Contains informing.
  • sippy-ng/src/tests/TestAnalysis.jsx#L252-L274: test chip visibility, label, and filled or outlined variant.

As per coding guidelines, “New or modified functionality should include test coverage.”

🤖 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 `@sippy-ng/src/tests/TestTable.jsx` around lines 499 - 545, Add frontend tests
in sippy-ng/src/tests/TestTable.jsx covering absent lifecycles, exclusively
informing lifecycles, and mixed lifecycles, verifying no icon plus the
“Informing” and “Contains informing” labels. In
sippy-ng/src/tests/TestAnalysis.jsx, add coverage for lifecycle analysis chip
visibility, labels, and filled versus outlined variants. Use the existing table
and analysis test setup and lifecycle indicator symbols at the referenced
ranges.

Source: Coding guidelines

🤖 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 `@pkg/apis/api/types.go`:
- Around line 526-527: Add a "lifecycles" case to both Test.GetArrayValue and
TestBQ.GetArrayValue in pkg/apis/api/types.go, returning test.Lifecycles so the
field works with in-memory array filtering; update the anchor site at lines
526-527 and the sibling site at lines 683-684.
- Around line 626-631: Update buildTestsResultsBQGenerator to handle lifecycle
filters consistently with the PostgreSQL path: filter against the lifecycle
field in the BigQuery test summaries and aggregate distinct returned lifecycles
at the lifecycle scope. If BigQuery cannot support this behavior, reject
lifecycle filters before selecting the BigQuery source while preserving
acceptance for supported sources.

---

Nitpick comments:
In `@sippy-ng/src/tests/TestTable.jsx`:
- Around line 499-545: Add frontend tests in sippy-ng/src/tests/TestTable.jsx
covering absent lifecycles, exclusively informing lifecycles, and mixed
lifecycles, verifying no icon plus the “Informing” and “Contains informing”
labels. In sippy-ng/src/tests/TestAnalysis.jsx, add coverage for lifecycle
analysis chip visibility, labels, and filled versus outlined variants. Use the
existing table and analysis test setup and lifecycle indicator symbols at the
referenced ranges.
🪄 Autofix

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: Pro Plus

Run ID: f97713e0-b13a-4917-bd79-0c3a96eb0903

📥 Commits

Reviewing files that changed from the base of the PR and between 59a59fe and 726aa58.

📒 Files selected for processing (7)
  • pkg/api/tests.go
  • pkg/apis/api/types.go
  • pkg/db/query/cumulative_query.go
  • pkg/db/query/test_queries.go
  • sippy-ng/src/tests/TestAnalysis.jsx
  • sippy-ng/src/tests/TestTable.jsx
  • test/integration/tests_report_test.go

Comment thread pkg/apis/api/types.go
Comment thread pkg/apis/api/types.go
@openshift-ci-robot

Copy link
Copy Markdown

@mstaeble: No Jira issue with key TRT-3870 exists in the tracker at https://redhat.atlassian.net.
Once a valid jira issue is referenced in the title of this pull request, request a refresh with /jira refresh.

Details

In response to this:

Summary

  • Add lifecycles field to the test API response using array_agg(DISTINCT lifecycle) in both collapsed and uncollapsed queries
  • Display an informing indicator on the Tests page: filled icon for fully-informing tests, outlined icon for mixed-lifecycle tests
  • Show a chip with matching label and variant (filled/outlined) on the Test Analysis page
  • Add integration tests covering the new field for both query paths

Screenshots

Test with all runs informing

Screenshot 2026-08-04 at 10 02 19 PM

Test with some but not all runs informing

Screenshot 2026-08-04 at 10 02 13 PM

Test Analysis for test with all runs informing

Screenshot 2026-08-04 at 10 09 31 PM

Test Analysis for test with some but not all runs informing

Screenshot 2026-08-04 at 10 09 02 PM

Badge in table in Test Analysis page

Screenshot 2026-08-04 at 10 09 13 PM

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

  • Test reports now display lifecycle information, including “Informing” and “Contains informing” indicators.

  • Lifecycle details are available in test analysis, test tables, JSON responses, and BigQuery data.

  • Collapsed and uncollapsed reports now preserve and aggregate lifecycle values.

  • Bug Fixes

  • Improved lifecycle filtering and reporting across test variants and jobs.

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.

@mstaeble mstaeble changed the title TRT-3870: Display lifecycle indicator on Tests and Test Analysis pages Display lifecycle indicator on Tests and Test Analysis pages Aug 5, 2026
Add a lifecycles field to the test API response using
array_agg(DISTINCT lifecycle) in both collapsed and uncollapsed
queries. The frontend displays an informing indicator: a filled icon
for fully-informing tests, an outlined icon for mixed-lifecycle tests,
and a chip with matching label/variant on the Test Analysis page.

Integration tests cover the new field for both query paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mstaeble
mstaeble force-pushed the worktree-TRT-3870-lifecycle-display branch from 726aa58 to cce8e9a Compare August 5, 2026 02:42
@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 Aug 5, 2026
@mstaeble
mstaeble marked this pull request as ready for review August 5, 2026 02:55
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 5, 2026
@openshift-ci
openshift-ci Bot requested review from neisw and smg247 August 5, 2026 02:55
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@dgoodwin

dgoodwin commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2026
@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgoodwin, mstaeble

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 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@mstaeble: 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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 602e7eb into openshift:main Aug 5, 2026
10 checks passed
@mstaeble
mstaeble deleted the worktree-TRT-3870-lifecycle-display branch August 5, 2026 13:31
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. lgtm Indicates that a PR is ready to be merged. 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.

3 participants