-
Notifications
You must be signed in to change notification settings - Fork 58
OCPBUGS-65657: Display OpenShift AI GPU validation message from API #3279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
OCPBUGS-65657: Display OpenShift AI GPU validation message from API #3279
Conversation
Fix UI to show the friendly label and detailed message from the API instead of displaying the technical validation ID when OpenShift AI operator is selected without GPU support.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yoavsc0302 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@yoavsc0302: This pull request references Jira Issue OCPBUGS-65657, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In 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. |
WalkthroughThe changes introduce support for a new cluster validation check for OpenShift AI GPU requirements. A translation entry is added, validation handling logic is extended to recognize the new validation ID, and a corresponding label mapping is created in cluster validation constants. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
libs/ui-lib/lib/common/components/clusterWizard/ReviewValidations.tsx (1)
111-116: Logic correctly extended to support new validation ID.The change properly enables the API message to be displayed for the new
openshift-ai-gpu-requirements-satisfiedvalidation ID, alongside the existingplatform-requirements-satisfied.Consider extracting the hardcoded validation IDs into a constant array for better maintainability:
+const VALIDATIONS_WITH_API_MESSAGE: Array<ClusterValidationId> = [ + 'platform-requirements-satisfied', + 'openshift-ai-gpu-requirements-satisfied', +]; + ... - if ( - validation.id === 'platform-requirements-satisfied' || - validation.id === 'openshift-ai-gpu-requirements-satisfied' - ) { + if (VALIDATIONS_WITH_API_MESSAGE.includes(validation.id as ClusterValidationId)) { fix = validation.message; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
libs/locales/lib/en/translation.json(1 hunks)libs/ui-lib/lib/common/components/clusterWizard/ReviewValidations.tsx(1 hunks)libs/ui-lib/lib/common/config/constants.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-02T08:03:57.204Z
Learnt from: jgyselov
Repo: openshift-assisted/assisted-installer-ui PR: 3151
File: libs/ui-lib/lib/cim/components/ClusterDeployment/constants.ts:25-25
Timestamp: 2025-09-02T08:03:57.204Z
Learning: In the openshift-assisted/assisted-installer-ui repository, non-English translations are handled separately from the main development process. When adding new translation keys to English locale files, it's expected that non-English locale files (es, fr, ja, ko, zh) may not immediately contain the corresponding translations, as these are managed through a different workflow.
Applied to files:
libs/locales/lib/en/translation.json
📚 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/common/components/clusterWizard/ReviewValidations.tsx
🔇 Additional comments (2)
libs/locales/lib/en/translation.json (1)
636-636: LGTM! Translation entry properly added.The new translation key for OpenShift AI GPU requirements is correctly formatted and appropriately placed. As per learnings, non-English locale files will be updated through a separate workflow.
libs/ui-lib/lib/common/config/constants.ts (1)
250-250: LGTM! Validation label mapping correctly added.The new cluster validation label mapping for
openshift-ai-gpu-requirements-satisfiedis properly formatted and consistently references the translation key added in the locales file. The placement near related validation entries enhances code organization.
Fix UI to show the friendly label and detailed message from the API instead of displaying the technical validation ID when OpenShift AI operator is selected without GPU support.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.