Skip to content

Improvements and fixes for new Feature Gate page#3779

Merged
openshift-merge-bot[bot] merged 8 commits into
openshift:mainfrom
dgoodwin:fg-filter-logic-v2
Jul 15, 2026
Merged

Improvements and fixes for new Feature Gate page#3779
openshift-merge-bot[bot] merged 8 commits into
openshift:mainfrom
dgoodwin:fg-filter-logic-v2

Conversation

@dgoodwin

@dgoodwin dgoodwin commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
  • Fix hook ordering
  • Fix ui_details links for feature gates
  • Continue using install success for install feature gates
  • Fix clickthrough on test details from fg details page
  • Re-use test details table on feature gate details page
  • Tooltip for why test count differs from table
  • Auto-display tests by capability if annotations tab is empty

I was a bit ambitious with the move to capability jobs and all tests should pass, this is not feasible for installer gates in flight as they still run full test suites that fully pass very rarely, and no true conformance suite exists yet. For now, install gates will return to requiring good pass results for install should succeed tests as they did before.

Summary by CodeRabbit

  • New Features
    • Added AWS dual-stack installation capability test coverage for release 4.22.
    • Feature gate details now show capability-specific test results, including installation tests.
    • Added explanatory help text for the Total Test Count metric.
  • Bug Fixes
    • Improved feature gate links for installation and non-installation capabilities.
    • Fixed navigation when viewing the latest release.
    • Corrected feature gate detail links across frontend routes.
  • Tests
    • Added end-to-end coverage confirming AWS dual-stack capability links return installation test results.

@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

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The change adds AWS dual-stack install synthetic data, selects install-specific capability tests in server links and frontend filters, updates feature-gate routing and test tables, and adds end-to-end coverage for the capability link.

Changes

Feature-gate capability flow

Layer / File(s) Summary
Capability data and backend links
cmd/sippy/seed_data.go, pkg/sippyserver/server.go
Adds AWS dual-stack install synthetic data and selects capability test names based on whether a feature gate is an install gate.
Frontend routing and test tables
sippy-ng/src/App.js, sippy-ng/src/tests/FeatureGateDetail.js, sippy-ng/src/tests/FeatureGates.js, sippy-ng/src/tests/TestTable.js
Resolves latest releases through an effect, normalizes detail links, renders filtered results with TestTable, and switches tabs based on loaded annotation rows.
End-to-end capability validation
test/e2e/feature_gates_test.go
Validates install-specific capability link names and the AWS dual-stack install capability response.

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

Sequence Diagram(s)

sequenceDiagram
  participant FeatureGateDetailWrapper
  participant FeatureGateDetail
  participant TestTable
  participant TestsAPI
  FeatureGateDetailWrapper->>FeatureGateDetail: resolve latest release and render detail
  FeatureGateDetail->>TestTable: pass annotation or capability filters
  TestTable->>TestsAPI: fetch filtered tests
  TestsAPI-->>TestTable: return test rows
  TestTable-->>FeatureGateDetail: report loaded row count
Loading

Possibly related PRs

  • openshift/sippy#3731: Adds related feature-gate HATEOAS links and capability filtering tests.
  • openshift/sippy#3769: Introduces related install-specific install should succeed test-report matching logic.

Suggested labels: ready-for-human-review

Suggested reviewers: petr-muller, xueqzhan, mstaeble

🚥 Pre-merge checks | ✅ 19 | ❌ 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.
Test Coverage For New Features ⚠️ Warning Go HATEOAS behavior has e2e regression tests, but the new App/FeatureGateDetail/FeatureGates/TestTable logic has no matching frontend tests. Add Jest/RTL coverage for the new redirect, auto-tab selection, capability filter, link normalization, and onDataLoaded behaviors.
✅ Passed checks (19 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main area of change, though it is broad and not very specific.
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 Changed Go code only adds data/link logic; no new panic paths, nil derefs, or unwrapped/ignored errors were introduced.
Sql Injection Prevention ✅ Passed No SQL query construction was added; DB calls still use placeholders, and the PR changes only URL/filter logic and seeded data.
Excessive Css In React Should Use Styles ✅ Passed Only small inline/sx objects (mostly 1–3 props) were added; no large repeated style blocks that would need useStyles.
Single Responsibility And Clear Naming ✅ Passed The changes add narrowly scoped helpers/constants with descriptive names; no generic managers, oversized structs, or muddled multi-purpose methods were introduced.
Feature Documentation ✅ Passed docs/features contains only the unrelated job-analysis-symptoms doc; no feature-gate doc exists to update for this PR.
Stable And Deterministic Test Names ✅ Passed The PR adds only static test names; no Ginkgo title uses generated or changing values in the changed code.
Test Structure And Quality ✅ Passed PASS: The PR adds plain testing e2e tests, not Ginkgo; the new test is focused, uses explicit assertion messages, and adds no cluster waits/resources.
Microshift Test Compatibility ✅ Passed The new e2e test only exercises Sippy API links and string checks; it doesn’t use MicroShift-unsupported OpenShift APIs, namespaces, or guarded features.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The added e2e test is API-only and contains no node/topology/scheduling assumptions or SNO-specific behavior.
Topology-Aware Scheduling Compatibility ✅ Passed PASS: The PR only changes synthetic test data, frontend HATEOAS/UI, and e2e tests; no deployment manifests, operator code, or controller scheduling logic was modified.
Ote Binary Stdout Contract ✅ Passed Touched Go changes are data/model and HATEOAS logic only; no main/init/TestMain/Ginkgo setup or stdout writes were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The new e2e test only calls the local Sippy API and follows internal HATEOAS links; no hardcoded IPv4, IPv4-only parsing, or external hosts are introduced.
No-Weak-Crypto ✅ Passed PR only changes feature-gate UI/test logic; diff/search found no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret compares.
Container-Privileges ✅ Passed PR only changes Go/JS/test code; no container/K8s manifest edits and repo search found no privileged/hostPID/hostNetwork/hostIPC/allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed No new logging of secrets appears in the changed code; added logs are absent except a count-only test log, with no passwords/tokens/PII.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@dgoodwin dgoodwin changed the title fg filter logic v2 Improvements and fixes for new Feature Gate page Jul 15, 2026
@openshift-ci
openshift-ci Bot requested review from petr-muller and xueqzhan July 15, 2026 17:21
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 15, 2026

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

🤖 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 `@cmd/sippy/seed_data.go`:
- Around line 376-382: Update the test-count mapping for
test-cap-aws-dual-stack-install so it does not seed the same install should
succeed: overall test already included by test-install-overall through
allJobCounts. Make the mappings exclusive or assign this capability a distinct
test name, ensuring each test/run combination is seeded only once.

In `@sippy-ng/src/tests/FeatureGateDetail.js`:
- Around line 74-79: Update handleAnnotationDataLoaded so automatic tab
selection occurs only when count === 0, preserving the existing setActiveTab and
tabAutoSelected behavior for empty annotation data.
- Around line 200-217: Update the two TestTable instances in FeatureGateDetail
so their URL-backed query state is isolated per tab. Provide distinct
query-state prefixes or controlled values for the annotation and capability
tables covering filters, sort, sortField, view, period, and pageSize, while
preserving each table’s existing filterModel behavior.
🪄 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: 4e76bfa2-c646-4cbb-b4f5-94fab772c6d5

📥 Commits

Reviewing files that changed from the base of the PR and between 84ee1c3 and 99607ae.

📒 Files selected for processing (7)
  • cmd/sippy/seed_data.go
  • pkg/sippyserver/server.go
  • sippy-ng/src/App.js
  • sippy-ng/src/tests/FeatureGateDetail.js
  • sippy-ng/src/tests/FeatureGates.js
  • sippy-ng/src/tests/TestTable.js
  • test/e2e/feature_gates_test.go

Comment thread cmd/sippy/seed_data.go
Comment on lines +74 to +79
const handleAnnotationDataLoaded = React.useCallback((count) => {
if (!tabAutoSelected.current && count <= 1) {
setActiveTab(1)
tabAutoSelected.current = true
}
}, [])

@coderabbitai coderabbitai Bot Jul 15, 2026

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Only auto-switch when annotations are empty.

Line 75 uses count <= 1, so a gate with one annotated test is redirected to capability results despite having annotation data. Change this to count === 0.

🤖 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/FeatureGateDetail.js` around lines 74 - 79, Update
handleAnnotationDataLoaded so automatic tab selection occurs only when count ===
0, preserving the existing setActiveTab and tabAutoSelected behavior for empty
annotation data.

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.

This is required because there's an implicit Overall row. We should comment this.

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.

@dgoodwin Thanks for the clarification — that makes sense, and it means my original suggestion to change this to count === 0 was incorrect. Since TestTable always includes an implicit "Overall" row, count === 1 actually means there are no real per-test annotation rows, so count <= 1 is the right threshold.

Here's a suggested comment to make that explicit:

const handleAnnotationDataLoaded = React.useCallback((count) => {
  // TestTable always includes an implicit "Overall" row, so a count of 1
  // means there are no real annotated tests. Auto-switch to the capability
  // tab in that case.
  if (!tabAutoSelected.current && count <= 1) {
    setActiveTab(1)
    tabAutoSelected.current = true
  }
}, [])

✏️ Learnings added
Learnt from: dgoodwin
Repo: openshift/sippy PR: 3779
File: sippy-ng/src/tests/FeatureGateDetail.js:74-79
Timestamp: 2026-07-15T18:06:01.572Z
Learning: In sippy-ng/src/tests/FeatureGateDetail.js, `TestTable` (sippy-ng/src/tests/TestTable.js) always includes an implicit "Overall" row in its loaded row count reported via `onDataLoaded`. So in `handleAnnotationDataLoaded`, checking `count <= 1` (not `count === 0`) is the correct way to detect "no real annotated tests" and auto-switch the active tab to "Tests by Capability".

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Comment on lines +200 to +217
<Box sx={{ display: activeTab === 0 ? 'block' : 'none' }}>
<TestTable
key={'fg-annotation-' + featureGate}
release={release}
collapse={false}
filterModel={annotationFilter}
onDataLoaded={handleAnnotationDataLoaded}
/>
)}
</Box>

{activeTab === 1 && gate.links && (
<TestResultsSection
title="Tests matching capability variant"
apiUrl={gate.links.tests_by_capability}
<Box sx={{ display: activeTab === 1 ? 'block' : 'none' }}>
<TestTable
key={'fg-capability-' + featureGate}
release={release}
collapse={false}
filterModel={capabilityFilter}
/>
)}
</Box>

@coderabbitai coderabbitai Bot Jul 15, 2026

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Isolate URL state for the two TestTable instances.

Both mounted tables use the same URL-backed query keys (filters, sort, sortField, view, period, and pageSize). Filtering or sorting one tab updates the hidden tab too; when revisited, it can fetch with the other tab’s filter and show incorrect results. Add a per-instance query-state prefix (or make this state fully controlled) and pass distinct values for annotation and capability tables.

🤖 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/FeatureGateDetail.js` around lines 200 - 217, Update the
two TestTable instances in FeatureGateDetail so their URL-backed query state is
isolated per tab. Provide distinct query-state prefixes or controlled values for
the annotation and capability tables covering filters, sort, sortField, view,
period, and pageSize, while preserving each table’s existing filterModel
behavior.

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.

Beyond scope for this I think.

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.

@dgoodwin, understood — acknowledged as out of scope for this PR. Let me know if you'd like me to open a follow-up issue to track isolating the URL-backed query state (filters, sort, sortField, view, period, pageSize) for the two TestTable instances, and I'll create it.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

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

♻️ Duplicate comments (1)
cmd/sippy/seed_data.go (1)

377-380: 🗄️ Data Integrity & Integration | 🟠 Major

Keep capability and general infrastructure test mappings exclusive.

Line 377 still reuses install should succeed: infrastructure, which test-install-infra seeds through allJobCounts for the new capability job. Because tests are resolved by name, the first 50 test/run combinations can be inserted twice, causing uniqueness failures or inflated results. Exclude the capability job from the general mapping, or use a distinct test name and update its consumers.

🤖 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 `@cmd/sippy/seed_data.go` around lines 377 - 380, Update the seed mappings
around the capability entry for awsAmd64CapabilityAWSDualStackInstall so it does
not reuse the test name “install should succeed: infrastructure” from
allJobCounts/test-install-infra. Exclude this capability job from the general
infrastructure mapping, or assign it a distinct test name and update every
consumer consistently, ensuring each test/run combination is seeded only once.
🤖 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.

Duplicate comments:
In `@cmd/sippy/seed_data.go`:
- Around line 377-380: Update the seed mappings around the capability entry for
awsAmd64CapabilityAWSDualStackInstall so it does not reuse the test name
“install should succeed: infrastructure” from allJobCounts/test-install-infra.
Exclude this capability job from the general infrastructure mapping, or assign
it a distinct test name and update every consumer consistently, ensuring each
test/run combination is seeded only once.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 27c7e1e4-eb19-48cb-bd55-dd583614024e

📥 Commits

Reviewing files that changed from the base of the PR and between 99607ae and 8d9ec0f.

📒 Files selected for processing (3)
  • cmd/sippy/seed_data.go
  • sippy-ng/src/tests/FeatureGateDetail.js
  • test/e2e/feature_gates_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/e2e/feature_gates_test.go
  • sippy-ng/src/tests/FeatureGateDetail.js

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e

@neisw

neisw commented Jul 15, 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 Jul 15, 2026
@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jul 15, 2026

Copy link
Copy Markdown
Contributor

@dgoodwin: 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 f4716f8 into openshift:main Jul 15, 2026
10 checks passed
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants