Skip to content

Remove ABI check#3118

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
rawagner:remove_abi_check
Aug 14, 2025
Merged

Remove ABI check#3118
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
rawagner:remove_abi_check

Conversation

@rawagner
Copy link
Copy Markdown
Member

@rawagner rawagner commented Aug 14, 2025

Summary by CodeRabbit

  • New Features

    • The Disconnected/Install toggle is now always available in multi-cluster mode (no extra flags required). Visibility in single-cluster mode remains unchanged.
  • Refactor

    • Simplified feature availability controls by consolidating installer feature flags, reducing configuration complexity without altering existing single-cluster behavior.

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Aug 14, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2025
@rawagner rawagner marked this pull request as ready for review August 14, 2025 09:21
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 14, 2025

Walkthrough

Narrows AssistedInstallerFeatureType to only 'ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE' and removes use of 'ASSISTED_INSTALLER_ABI' in ClusterDetailsForm. The disconnected/install Switch now renders based solely on not being in single-cluster mode. No other behavior or API signatures are changed.

Changes

Cohort / File(s) Summary
Feature gate typing
libs/ui-lib/lib/common/features/featureGate.tsx
Restricts AssistedInstallerFeatureType by removing 'ASSISTED_INSTALLER_ABI' from the union; type now allows only 'ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE'.
Cluster wizard conditional rendering
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx
Removes useFeature('ASSISTED_INSTALLER_ABI') and simplifies condition for rendering the disconnected/install Switch to depend only on not being in single-cluster mode.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ClusterDetailsForm
  participant FeatureGate

  User->>ClusterDetailsForm: Open Cluster Details
  ClusterDetailsForm->>FeatureGate: useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE')
  FeatureGate-->>ClusterDetailsForm: isSingleClusterFeatureEnabled
  alt Not single-cluster
    ClusterDetailsForm-->>User: Render disconnected/install Switch
  else Single-cluster
    ClusterDetailsForm-->>User: Hide disconnected/install Switch
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

lgtm, approved, size/M

Suggested reviewers

  • celdrake
  • ElayAharoni
  • ammont82

Poem

I nibbled the flags, left one to remain,
ABI hopped off, single-cluster we retain.
A switch now appears when clusters are free—
no gate to pass, just plain UI glee.
Thump-thump, ship it, ears held high,
carrots committed, features dry. 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 14, 2025
@openshift-ci openshift-ci bot requested review from ammont82 and celdrake August 14, 2025 09:22
@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 14, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 14, 2025
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Aug 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ammont82, rawagner

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

@rawagner
Copy link
Copy Markdown
Member Author

/cherry-pick releases/v2.44

@openshift-cherrypick-robot
Copy link
Copy Markdown
Contributor

@rawagner: once the present PR merges, I will cherry-pick it on top of releases/v2.44 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick releases/v2.44

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.

Copy link
Copy Markdown

@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 (2)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx (1)

167-177: Optional: consider i18n for the label text.

The switch label is a hard-coded string while the rest of the form leverages i18n. Consider wrapping the label in t(...) for consistency.

libs/ui-lib/lib/common/features/featureGate.tsx (1)

3-8: Optional: derive the feature string type from a single source to avoid drift.

To keep the string literal list and type in sync as features evolve, you can define a single const and derive the type from it.

Apply this diff near the top:

-// Must conform Unleash constants
-export type AssistedInstallerFeatureType = 'ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE';
+// Must conform Unleash constants
+export const AssistedInstallerFeatures = ['ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE'] as const;
+export type AssistedInstallerFeatureType = typeof AssistedInstallerFeatures[number];

No other changes are required; existing usages of AssistedInstallerFeatureType continue to work.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b779817 and 5143c47.

📒 Files selected for processing (2)
  • libs/ui-lib/lib/common/features/featureGate.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx (1 hunks)
🔇 Additional comments (4)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx (2)

167-177: Intentional broadening of switch visibility — aligns with “Remove ABI check”.

Dropping the ABI gate to render the disconnected/air‑gapped switch whenever not in single‑cluster mode matches the PR objective. No other logic paths are impacted here.


167-177: No ASSISTED_INSTALLER_ABI references found — review remaining ASSISTED_INSTALLER_ feature-flag usage*

Quick summary: a repo-wide search found no occurrences of ASSISTED_INSTALLER_ABI, isABIEnabled, or useFeature('ASSISTED_INSTALLER_ABI'). There are still many places using ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE and the installDisconnected flag — confirm whether those feature gates should remain now that ABI gating was removed.

Files/locations to review:

  • libs/ui-lib/lib/ocm/hooks/use-feature-detection.ts (handles ASSISTED_INSTALLER* overrides)
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx (defines installDisconnected; useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE'))
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx (original snippet; Switch controlled by installDisconnected and gated by !isSingleClusterFeatureEnabled)
  • libs/ui-lib/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx (disconnected step uses installDisconnected)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx (conditional UI based on isSingleClusterFeatureEnabled)
  • libs/ui-lib/lib/ocm/components/clusters/AssistedInstallerHeader.tsx (DeveloperPreview gated by single-cluster feature)
  • libs/ui-lib/lib/ocm/components/hosts/use-hosts-table.tsx (logic conditional on isSingleClusterFeatureEnabled)
  • Note: vendor Go files under apps/assisted-disconnected-ui/proxy contain unrelated "ABI" comments — safe to ignore.

Actionable next step: if the goal was only to remove ASSISTED_INSTALLER_ABI, no further code changes are required. If you intended to remove any ABI-driven behavior entirely, update or remove the ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE checks and the installDisconnected flow in the files above.

libs/ui-lib/lib/common/features/featureGate.tsx (2)

4-4: Type narrowing is consistent with removing ABI.

Restricting AssistedInstallerFeatureType to only 'ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE' aligns with the goal to drop ABI. The hardcoded feature maps below are already consistent with this narrowed type.


4-4: Double-check for external/API breakage and lingering references.

I ran the provided ripgrep for ASSISTED_INSTALLER_ABI — no matches were returned from the repository.

  • libs/ui-lib/lib/common/features/featureGate.tsx (line ~4): export type AssistedInstallerFeatureType = 'ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE';

Please confirm any external consumers have been updated (or release this change under a breaking-change version bump).

@rawagner rawagner marked this pull request as draft August 14, 2025 09:28
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2025
@rawagner rawagner marked this pull request as ready for review August 14, 2025 09:28
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2025
@openshift-ci openshift-ci bot requested review from ElayAharoni and batzionb August 14, 2025 09:29
@openshift-merge-bot openshift-merge-bot bot merged commit 134a52a into openshift-assisted:master Aug 14, 2025
32 checks passed
@openshift-cherrypick-robot
Copy link
Copy Markdown
Contributor

@rawagner: new pull request created: #3119

Details

In response to this:

/cherry-pick releases/v2.44

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.

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

3 participants