MGMT-22503: After selecting Ai-bundle and discovering only amd gpu host the nvdia…#3323
Conversation
|
@ElayAharoni: This pull request references MGMT-22503 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 bug to target the "4.22.0" version, but no target version was set. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ElayAharoni The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
WalkthroughOperatorCheckbox no longer counts bundle membership when computing checkbox checked state; it now only considers whether the operator ID is present in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
@ElayAharoni: This pull request references MGMT-22503 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 bug to target the "4.22.0" version, but no target version was set. 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. |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx (1)
193-205: Prevent user interaction with unmonitored operators.The
onChangehandler andisDisabledlogic don't account forisMonitored, which creates a confusing user experience:
- Users can click an unmonitored operator's checkbox.
- The operator gets added to/removed from
selectedOperators.- But the checkbox immediately appears unchecked again (because
isCheckedgates onisMonitored).- This makes the checkbox appear unresponsive or broken.
Recommended fix: Either disable unmonitored operators or filter them in the
onChangehandler.Option 1 (preferred): Disable unmonitored operators:
+ const notMonitoredReason = !isMonitored + ? 'This operator is not available for the current hardware configuration.' + : undefined; + const disabledReason = isInBundle ? 'This operator is part of a bundle and cannot be deselected.' : notStandalone ? 'This operator cannot be installed as a standalone' : parentOperatorName ? `This operator is a dependency of ${parentOperatorName}` - : getFeatureDisabledReason(featureId); + : notMonitoredReason || getFeatureDisabledReason(featureId);Option 2: Filter in onChange (less recommended as it's less clear to users):
onChange={(_, checked) => { + if (!isMonitored && checked) return; setFieldValue( 'selectedOperators', getNewOperators( values.selectedOperators, operatorId, preflightRequirements, checked, opSpecs, ), ); }}
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx (1)
libs/ui-lib/lib/common/selectors/clusterSelectors.ts (1)
selectMonitoredOperators(35-38)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: format
- GitHub Check: lint
- GitHub Check: circular-deps
- GitHub Check: unit-tests
- GitHub Check: tests
- GitHub Check: translation-files
🔇 Additional comments (1)
libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx (1)
25-30: LGTM!The import of
selectMonitoredOperatorsis correctly structured and the selector is available from the common module.
libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx
Outdated
Show resolved
Hide resolved
libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx
Outdated
Show resolved
Hide resolved
0b8210c to
ea3257f
Compare
|
@ElayAharoni: This pull request references MGMT-22503 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 bug to target the "4.22.0" version, but no target version was set. 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. |
… gpu operator remains selected in operators page Signed-off-by: Elay Aharoni <elayaha@gmail.com>
ea3257f to
e7b5262
Compare
|
@ElayAharoni: This pull request references MGMT-22503 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 bug to target the "4.22.0" version, but no target version was set. 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. |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx(1 hunks)libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsSelect.tsx(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- libs/ui-lib/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-21T04:40:36.292Z
Learnt from: linoyaslan
Repo: openshift-assisted/assisted-installer-ui PR: 3190
File: libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx:55-63
Timestamp: 2025-10-21T04:40:36.292Z
Learning: In libs/ui-lib/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx, the network reordering logic in the useEffect (swapping clusterNetworks and serviceNetworks based on the primary machine network's IP family) is for UI consistency only. Validation of empty or invalid CIDRs is handled separately by validation schemas, not by the reordering logic.
Applied to files:
libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsSelect.tsx
🧬 Code graph analysis (1)
libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsSelect.tsx (2)
libs/ui-lib/lib/common/types/clusters.ts (1)
OperatorsValues(61-64)libs/ui-lib/lib/common/selectors/clusterSelectors.ts (1)
selectOlmOperators(40-44)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: lint
- GitHub Check: format
- GitHub Check: tests
- GitHub Check: unit-tests
- GitHub Check: circular-deps
- GitHub Check: translation-files
🔇 Additional comments (3)
libs/ui-lib/lib/ocm/components/clusterWizard/OperatorsSelect.tsx (3)
14-14: LGTM!The import correctly brings in the
selectOlmOperatorsselector function for filtering monitored OLM operators.
40-40: LGTM!Correctly extends the Formik context destructuring to obtain
setFieldValuefor form state updates.
54-55: The mount-only sync is intentional for preserving user selections.The empty dependency array correctly ensures the sync runs only once on initial mount to restore previously selected operators (when
monitoredOperators.length > 0). This prevents user selections from being overwritten if the cluster prop updates during the wizard step. This is standard wizard UX behavior and the code comments and logic confirm this is by design.
https://issues.redhat.com/browse/MGMT-22503
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.