Skip to content

Conversation

@zszabo-rh
Copy link
Contributor

@zszabo-rh zszabo-rh commented Nov 18, 2025

When creating a new cluster through the AI Chat Bot, the bot incorrectly required a mandatory SSH public key.
This fix removes the SSH key parameter from the create_cluster tool so that clusters are always created without one by default. The SSH key can then be added separately as a second step using the set_cluster_ssh_key tool.

Fixes MGMT-22245
Requires this PR to make eval-test pass.

Summary by CodeRabbit

  • Refactor

    • SSH public key parameter has been removed from cluster creation functionality. Users will no longer be able to provide SSH keys during cluster setup through this interface.
  • Tests

    • Updated tests to align with parameter removal.

@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 18, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 18, 2025

@zszabo-rh: This pull request references MGMT-22245 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.21.0" version, but no target version was set.

In response to this:

When creating a new cluster through the AI Chat Bot, the bot incorrectly required a mandatory SSH public key.
This fix removes the SSH key parameter from the create_cluster tool so that clusters are always created without one by default. The SSH key can then be added separately as a second step using the set_cluster_ssh_key tool.

Fixes MGMT-22245

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.

@openshift-ci openshift-ci bot requested review from carbonin and jhernand November 18, 2025 05:29
@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Walkthrough

Removes the ssh_public_key parameter from the create_cluster function signature and eliminates all related SSH key handling, parameter logging, cluster/InfraEnv construction code, and documentation references. Updates three test functions to remove explicit ssh_public_key=None arguments.

Changes

Cohort / File(s) Summary
Function signature and SSH key handling removal
assisted_service_mcp/src/tools/cluster_tools.py
Removed ssh_public_key parameter from create_cluster function signature; eliminated all related SSH key handling including parameter logging, cluster parameter construction, InfraEnv parameter construction (ssh_authorized_key), and documentation strings referencing the parameter.
Test parameter updates
tests/test_tools_module.py
Removed explicit ssh_public_key=None arguments from three test function invocations: test_create_cluster_invalid_platform_for_sno_returns_message, test_tool_create_cluster_module, and test_tool_create_cluster_with_none_cpu_architecture_module.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify all ssh_public_key references have been removed from the function and related call sites
  • Confirm test assertions still pass without the parameter override
  • Check for any external documentation or examples referencing the removed parameter

Possibly related PRs

Suggested labels

size/L

Suggested reviewers

  • carbonin
  • jhernand
  • omertuc

Poem

🐰 A hop, skip, and SSH key removal,
No more public keys to approve-al!
The cluster now cleaner, the function more lean,
Simplicity reigns in this green machine. 🌿

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: removing SSH key parameter handling from the create_cluster function, which is exactly what the changeset implements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • 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

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

@openshift-ci
Copy link

openshift-ci bot commented Nov 18, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zszabo-rh
Once this PR has been reviewed and has the lgtm label, please assign eranco74 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 openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 18, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 18, 2025

@zszabo-rh: This pull request references MGMT-22245 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.21.0" version, but no target version was set.

In response to this:

When creating a new cluster through the AI Chat Bot, the bot incorrectly required a mandatory SSH public key.
This fix removes the SSH key parameter from the create_cluster tool so that clusters are always created without one by default. The SSH key can then be added separately as a second step using the set_cluster_ssh_key tool.

Fixes MGMT-22245

Summary by CodeRabbit

  • Refactor

  • SSH public key parameter has been removed from cluster creation functionality. Users will no longer be able to provide SSH keys during cluster setup through this interface.

  • Tests

  • Updated tests to align with parameter removal.

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.

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)
assisted_service_mcp/src/tools/cluster_tools.py (1)

124-136: Clarify follow‑up SSH key workflow in create_cluster docs

The updated docstring and examples correctly remove the ssh_public_key parameter and list only cpu_architecture and platform as optional. To make the new flow discoverable, consider adding a short note here that SSH keys are no longer set at creation time and must be configured separately via set_cluster_ssh_key after the cluster is created. This keeps tool users from searching for the removed parameter.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1611ccf and 44227c3.

📒 Files selected for processing (2)
  • assisted_service_mcp/src/tools/cluster_tools.py (2 hunks)
  • tests/test_tools_module.py (0 hunks)
💤 Files with no reviewable changes (1)
  • tests/test_tools_module.py
⏰ 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). (1)
  • GitHub Check: Red Hat Konflux / assisted-service-mcp-saas-main-on-pull-request
🔇 Additional comments (1)
assisted_service_mcp/src/tools/cluster_tools.py (1)

143-151: Logging update aligns with SSH‑less creation (looks good)

The log message now matches the updated signature and no longer logs an SSH key, which is a nice security/privacy improvement. Behavior and telemetry fields are consistent with the new contract.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 18, 2025

@zszabo-rh: This pull request references MGMT-22245 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.21.0" version, but no target version was set.

In response to this:

When creating a new cluster through the AI Chat Bot, the bot incorrectly required a mandatory SSH public key.
This fix removes the SSH key parameter from the create_cluster tool so that clusters are always created without one by default. The SSH key can then be added separately as a second step using the set_cluster_ssh_key tool.

Fixes MGMT-22245
Requires this PR to make eval-test pass.

Summary by CodeRabbit

  • Refactor

  • SSH public key parameter has been removed from cluster creation functionality. Users will no longer be able to provide SSH keys during cluster setup through this interface.

  • Tests

  • Updated tests to align with parameter removal.

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.

@zszabo-rh
Copy link
Contributor Author

/test eval-test

2 similar comments
@zszabo-rh
Copy link
Contributor Author

/test eval-test

@zszabo-rh
Copy link
Contributor Author

/test eval-test

Copy link
Collaborator

@eranco74 eranco74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 18, 2025
@zszabo-rh
Copy link
Contributor Author

/test eval-test

2 similar comments
@zszabo-rh
Copy link
Contributor Author

/test eval-test

@zszabo-rh
Copy link
Contributor Author

/test eval-test

@openshift-ci
Copy link

openshift-ci bot commented Nov 18, 2025

@zszabo-rh: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/eval-test 44227c3 link false /test eval-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@zszabo-rh
Copy link
Contributor Author

/test eval-test

@zszabo-rh
Copy link
Contributor Author

/hold checking a different approach first

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 19, 2025
@openshift-merge-robot
Copy link

PR needs rebase.

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.

@carbonin
Copy link
Collaborator

Do we want to close this one if we think the llama patch works?

@zszabo-rh zszabo-rh closed this Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants