Skip to content

Conversation

@yoavsc0302
Copy link
Contributor

@yoavsc0302 yoavsc0302 commented Nov 24, 2025

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

  • New Features
    • Added support for validating OpenShift AI GPU requirements during cluster configuration and review processes.

✏️ Tip: You can customize this high-level summary in your review settings.

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.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 24, 2025
@openshift-ci openshift-ci bot requested review from ammont82 and jgyselov November 24, 2025 13:02
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Nov 24, 2025
@openshift-ci
Copy link

openshift-ci bot commented Nov 24, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yoavsc0302
Once this PR has been reviewed and has the lgtm label, please assign ammont82 for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

@yoavsc0302: This pull request references Jira Issue OCPBUGS-65657, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

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.

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
Copy link

coderabbitai bot commented Nov 24, 2025

Walkthrough

The 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

Cohort / File(s) Summary
Translation Addition
libs/locales/lib/en/translation.json
Added new translation key for OpenShift AI GPU requirements validation message
Validation Logic
libs/ui-lib/lib/common/components/clusterWizard/ReviewValidations.tsx
Extended failing-validation fix suggestion to include the new openshift-ai-gpu-requirements-satisfied validation ID alongside existing platform requirements check
Validation Configuration
libs/ui-lib/lib/common/config/constants.ts
Added new cluster validation label mapping for openshift-ai-gpu-requirements-satisfied to the clusterValidationLabels configuration object

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Changes follow consistent patterns already established in the codebase for adding new validation IDs
  • Low complexity additions without intricate logic or structural modifications
  • All three files contain straightforward, localized updates with minimal cross-file dependencies

Possibly related PRs

  • PR #3055: Adds and handles the same cluster validation ID openshift-ai-gpu-requirements-satisfied across translations, labels, and validation handling logic.

Suggested labels

lgtm, approved, size/S, jira/valid-bug

Suggested reviewers

  • ammont82
  • ElayAharoni
  • jgyselov

Poem

🐰 A GPU requirement, now declared with care,
Labels and translations floating through the air,
Validation checks in place, so bright and true,
OpenShift AI shines with computational view! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding support to display OpenShift AI GPU validation messages from the API instead of technical IDs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

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.

❤️ Share

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

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 24, 2025
Copy link

@coderabbitai coderabbitai bot left a 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-satisfied validation ID, alongside the existing platform-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

📥 Commits

Reviewing files that changed from the base of the PR and between 713ce38 and c8c9adf.

📒 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-satisfied is properly formatted and consistently references the translation key added in the locales file. The placement near related validation entries enhances code organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants