move Set TechPreviewNoUpgrade on the target cluster#2911
Conversation
to host discovery step Signed-off-by: Elay Aharoni <elayaha@gmail.com>
WalkthroughThis pull request simplifies and extends the cluster creation flow. In the ClusterDetails component, the logic for the single cluster feature and its associated API interactions has been removed. In contrast, the HostDiscovery component now introduces a feature toggle to conditionally enable API calls for updating the installation configuration. The new asynchronous onNext function performs the API call and error handling when the single cluster feature is enabled, streamlining the control flow for cluster configuration updates. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HostDiscoveryForm
participant FeatureToggle
participant ClustersAPI
participant ErrorHandler
User->>HostDiscoveryForm: Click "Next"
HostDiscoveryForm->>FeatureToggle: Check single cluster feature enabled
FeatureToggle-->>HostDiscoveryForm: Return (true/false)
alt Feature enabled
HostDiscoveryForm->>ClustersAPI: updateInstallConfig(config)
alt API call successful
ClustersAPI-->>HostDiscoveryForm: Success
HostDiscoveryForm->>User: Proceed to next step
else API call fails
ClustersAPI-->>HostDiscoveryForm: Error
HostDiscoveryForm->>ErrorHandler: Invoke handleApiError
ErrorHandler-->>HostDiscoveryForm: Alert error & dispatch server error action
end
else Feature not enabled
HostDiscoveryForm->>User: Proceed to next step without API call
end
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetails.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "@openshift-assisted/eslint-config" to extend from. Please check that the name of the config is correct. The config "@openshift-assisted/eslint-config" was referenced from the config file in "/libs/ui-lib/.eslintrc.cjs". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. libs/ui-lib/lib/ocm/components/clusterWizard/HostDiscovery.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "@openshift-assisted/eslint-config" to extend from. Please check that the name of the config is correct. The config "@openshift-assisted/eslint-config" was referenced from the config file in "/libs/ui-lib/.eslintrc.cjs". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Graph Analysis (1)libs/ui-lib/lib/ocm/components/clusterWizard/HostDiscovery.tsx (3)
⏰ Context from checks skipped due to timeout of 90000ms (6)
🔇 Additional comments (7)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ElayAharoni, rawagner 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 |
7167786
into
openshift-assisted:master
…ed#2911) to host discovery step Signed-off-by: Elay Aharoni <elayaha@gmail.com>
move Set TechPreviewNoUpgrade on the target cluster to host discovery
Summary by CodeRabbit
New Features
Refactor