CONSOLE-5400: Make Node management enhancements flagged by OpenShift 5#16797
CONSOLE-5400: Make Node management enhancements flagged by OpenShift 5#16797jeff-phillips-18 wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@jeff-phillips-18: This pull request references CONSOLE-5400 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 either version "5.0." or "openshift-5.0.", but it targets "openshift-4.23" instead. DetailsIn 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (22)
💤 Files with no reviewable changes (10)
🚧 Files skipped from review as they are similar to previous changes (12)
WalkthroughThe console removes Node Management V1 preference and provider wiring, removes related translations, and changes node pages, dashboards, and tests to use ChangesNode Management flag migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/packages/console-app/src/components/nodes/__tests__/NodeDetailsPage.spec.tsx (1)
97-178: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winVerify the exact feature-flag key in all migrated tests.
The tests currently mock
useFlagwith unconditional booleans, so they can remain green even if production code queries the wrong or stale flag. AssertFLAG_OPENSHIFT_5at each affected site, or make each mock conditional on that key.
frontend/packages/console-app/src/components/nodes/__tests__/NodeDetailsPage.spec.tsx#L97-L178: tie the tab-state mock toFLAG_OPENSHIFT_5.frontend/packages/console-app/src/components/nodes/__tests__/NodeLogs.spec.tsx#L84-L97: tie the heading-state mock toFLAG_OPENSHIFT_5.frontend/packages/console-app/src/components/nodes/node-dashboard/__tests__/InventoryCard.spec.tsx#L141-L153: tie the pod-path mock toFLAG_OPENSHIFT_5.frontend/packages/console-app/src/components/nodes/node-dashboard/__tests__/NodeDashboard.spec.tsx#L72-L97: tie the dashboard-layout mock toFLAG_OPENSHIFT_5.🤖 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 `@frontend/packages/console-app/src/components/nodes/__tests__/NodeDetailsPage.spec.tsx` around lines 97 - 178, Update the mocks in frontend/packages/console-app/src/components/nodes/__tests__/NodeDetailsPage.spec.tsx lines 97-178, frontend/packages/console-app/src/components/nodes/__tests__/NodeLogs.spec.tsx lines 84-97, frontend/packages/console-app/src/components/nodes/node-dashboard/__tests__/InventoryCard.spec.tsx lines 141-153, and frontend/packages/console-app/src/components/nodes/node-dashboard/__tests__/NodeDashboard.spec.tsx lines 72-97 so useFlag is conditional on the requested key FLAG_OPENSHIFT_5, ensuring each test verifies production queries that exact feature flag rather than accepting any boolean result.
🤖 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.
Nitpick comments:
In
`@frontend/packages/console-app/src/components/nodes/__tests__/NodeDetailsPage.spec.tsx`:
- Around line 97-178: Update the mocks in
frontend/packages/console-app/src/components/nodes/__tests__/NodeDetailsPage.spec.tsx
lines 97-178,
frontend/packages/console-app/src/components/nodes/__tests__/NodeLogs.spec.tsx
lines 84-97,
frontend/packages/console-app/src/components/nodes/node-dashboard/__tests__/InventoryCard.spec.tsx
lines 141-153, and
frontend/packages/console-app/src/components/nodes/node-dashboard/__tests__/NodeDashboard.spec.tsx
lines 72-97 so useFlag is conditional on the requested key FLAG_OPENSHIFT_5,
ensuring each test verifies production queries that exact feature flag rather
than accepting any boolean result.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b4176693-3198-4254-80c9-3b755c778519
📒 Files selected for processing (22)
frontend/e2e/tests/console/nodes/node-groups-filter.spec.tsfrontend/packages/console-app/console-extensions.jsonfrontend/packages/console-app/locales/en/console-app.jsonfrontend/packages/console-app/locales/es/console-app.jsonfrontend/packages/console-app/locales/fr/console-app.jsonfrontend/packages/console-app/locales/ja/console-app.jsonfrontend/packages/console-app/locales/ko/console-app.jsonfrontend/packages/console-app/locales/zh/console-app.jsonfrontend/packages/console-app/package.jsonfrontend/packages/console-app/src/components/nodes/NodeDetailsPage.tsxfrontend/packages/console-app/src/components/nodes/NodeGroupEditButton.tsxfrontend/packages/console-app/src/components/nodes/NodeLogs.tsxfrontend/packages/console-app/src/components/nodes/NodesPage.tsxfrontend/packages/console-app/src/components/nodes/__tests__/NodeDetailsPage.spec.tsxfrontend/packages/console-app/src/components/nodes/__tests__/NodeLogs.spec.tsxfrontend/packages/console-app/src/components/nodes/node-dashboard/DetailsCard.tsxfrontend/packages/console-app/src/components/nodes/node-dashboard/InventoryCard.tsxfrontend/packages/console-app/src/components/nodes/node-dashboard/NodeDashboard.tsxfrontend/packages/console-app/src/components/nodes/node-dashboard/__tests__/InventoryCard.spec.tsxfrontend/packages/console-app/src/components/nodes/node-dashboard/__tests__/NodeDashboard.spec.tsxfrontend/packages/console-app/src/consts.tsfrontend/packages/console-app/src/hooks/useNodeMgmtV1FlagProvider.ts
💤 Files with no reviewable changes (10)
- frontend/packages/console-app/locales/en/console-app.json
- frontend/packages/console-app/locales/es/console-app.json
- frontend/packages/console-app/src/hooks/useNodeMgmtV1FlagProvider.ts
- frontend/packages/console-app/package.json
- frontend/packages/console-app/locales/fr/console-app.json
- frontend/packages/console-app/src/consts.ts
- frontend/packages/console-app/locales/ja/console-app.json
- frontend/packages/console-app/locales/ko/console-app.json
- frontend/packages/console-app/locales/zh/console-app.json
- frontend/packages/console-app/console-extensions.json
|
/label px-approved |
|
Scheduling tests matching the |
|
/test e2e-playwright |
ef46b67 to
88f74e1
Compare
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jeff-phillips-18, logonoff, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@jeff-phillips-18, the Playwright timeout issue is known. Trying to fix with #16780, but flakes are blocking. |
|
/test e2e-playwright |
|
@jeff-phillips-18: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Analysis / Root cause:
Node management enhancements (node groups, health tab, configuration/workload tabs, etc.) were previously gated behind a compound flag FLAG_NODE_MGMT_V1 that required both TECH_PREVIEW to be enabled on the cluster and an individual user preference toggle (console.nodeMgmtV1.enabled). As these features graduate from tech preview to GA in OpenShift 5, the per-user opt-in gating is no longer appropriate — the features should be unconditionally available on OpenShift 5+ clusters.
Solution description:
Replace the FLAG_NODE_MGMT_V1 feature flag with the existing FLAG_OPENSHIFT_5 platform version flag across all node management components.
This removes:
All consuming components (NodeDetailsPage, NodesPage, NodeLogs, NodeGroupEditButton, DetailsCard, InventoryCard, NodeDashboard) now use
useFlag(FLAG_OPENSHIFT_5)Screenshots / screen recording:
No visual changes
Test setup:
Test cases:
Browser conformance:
Reviewers and assignees:
Console Approver:
/assign @jhadvig
Docs approver:
/assign @jseseCCS
PX approver:
/assign @rh-joshbeverly
🤖 Generated with https://claude.com/claude-code
Summary by CodeRabbit