Skip to content

MGMT-21349: tool description update for vips#75

Closed
zszabo-rh wants to merge 1 commit intoopenshift-assisted:masterfrom
zszabo-rh:tool_description_for_vips
Closed

MGMT-21349: tool description update for vips#75
zszabo-rh wants to merge 1 commit intoopenshift-assisted:masterfrom
zszabo-rh:tool_description_for_vips

Conversation

@zszabo-rh
Copy link
Copy Markdown
Contributor

@zszabo-rh zszabo-rh commented Aug 26, 2025

Summary by CodeRabbit

  • Documentation
    • Clarified VIP requirements: only needed for multi-node clusters when user-managed networking is disabled; not required for single-node or user-managed networking.
    • Added instruction to set VIPs only after hosts are discovered (post-Discovery ISO boot) to avoid “No suitable matching CIDR found for VIP” errors.
    • Added “Preconditions”/Notes to command/help text and example docs.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 26, 2025
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 26, 2025

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

Details

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 26, 2025

Walkthrough

Updated documentation and docstrings for set_cluster_vips across README, example prompts, and server.py to clarify VIP applicability (multi-node with user-managed networking disabled) and require host discovery before setting VIPs. No code or API signature changes.

Changes

Cohort / File(s) Summary
Docs: README notes
README.md
Added a Notes block under set_cluster_vips clarifying VIP usage: applicable only for multi-node clusters with user-managed networking disabled; not required for single-node clusters or clusters with user-managed networking; warn to set VIPs after hosts are discovered to avoid CIDR matching errors like No suitable matching CIDR found for VIP.
Example prompts: discovery-dependent guidance
doc/example_prompts.md
Inserted a Notes subsection under set_cluster_vips with bullets about applicability and the need to run after host discovery; clarified that attempting earlier may fail due to unknown subnets.
Server docstring: Preconditions
server.py
Augmented set_cluster_vips docstring with a "Preconditions" subsection documenting that hosts must be discovered so subnets are known and that VIPs apply only to multi-node clusters with user-managed networking disabled. No functional or signature changes.

Sequence Diagram(s)

(omitted — changes are documentation-only and do not alter control flow)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • jhernand
  • omertuc

Poem

I twitch my whiskers at network tips,
“Discover hosts first,” I hum and skip.
Multi-node clusters need VIPs in place,
Single-node fields keep a simpler pace.
Subnets align — a joyful hop and flip. 🐇✨


📜 Recent 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 sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 76fb675 and e831a24.

📒 Files selected for processing (3)
  • README.md (1 hunks)
  • doc/example_prompts.md (1 hunks)
  • server.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • server.py
  • README.md
  • doc/example_prompts.md
⏰ 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
✨ 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 requested review from jhernand and omertuc August 26, 2025 08:16
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Aug 26, 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 jhernand for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@openshift-ci openshift-ci Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 26, 2025
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 26, 2025

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

Details

In response to this:

Summary by CodeRabbit

  • Documentation
  • Clarified VIP configuration requirements: only for multi-node clusters with installer-managed networking; not needed for single-node or user-managed networking.
  • Added a prerequisite to set VIPs only after hosts are discovered (post-Discovery ISO boot) to avoid “No suitable matching CIDR found for VIP” errors.
  • Updated examples to reflect the discovery-first workflow and removed pre-discovery VIP configuration examples.
  • Introduced a “Preconditions” section in relevant command/help text to make these requirements explicit.

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
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: 1

🧹 Nitpick comments (3)
server.py (1)

391-429: Optional: add a runtime preflight guard to prevent no-op/misuse on SNO or UMAN clusters.

While the docs now clarify applicability, adding a lightweight check would improve UX by short-circuiting with a clear message instead of sending an update that the backend will ignore/reject.

Example (outside the changed lines, illustrative only—adapt field names to your client model):

# Inside set_cluster_vips before update_cluster(...)
client = InventoryClient(get_access_token())
cluster = await client.get_cluster(cluster_id=cluster_id)

is_uman = bool(getattr(cluster, "user_managed_networking", False))
ha_mode = getattr(cluster, "high_availability_mode", "")  # "Full" or "None"
is_sno = ha_mode == "None" or bool(getattr(cluster, "single_node", False))

if is_uman or is_sno:
    log.info("Skipping VIP update: cluster is %s", "UMN" if is_uman else "SNO")
    return "VIPs are not applicable for single-node or user-managed networking clusters."

If you want, I can open a follow-up PR to wire this in and add a unit test.

README.md (1)

100-103: Align bullet style with repository conventions and markdownlint MD004.

Elsewhere in this README bullets use asterisks; the new note uses dashes and triggers MD004. Switch to asterisks for consistency.

-  
-  Note:
-  - Use only for multi-node clusters with installer-managed networking. Single-node clusters and clusters with user-managed networking do not require VIPs.
-  - Ensure hosts are discovered first (after booting with the Discovery ISO) so that matching subnets are known; attempting to set VIPs earlier can result in errors such as "No suitable matching CIDR found for VIP".
+  
+  Note:
+  * Use only for multi-node clusters with installer-managed networking. Single-node clusters and clusters with user-managed networking do not require VIPs.
+  * Ensure hosts are discovered first (after booting with the Discovery ISO) so that matching subnets are known; attempting to set VIPs earlier can result in errors such as "No suitable matching CIDR found for VIP".
doc/example_prompts.md (1)

51-53: Make both examples discovery-gated and use documentation-safe IPs (RFC 5737).

The second example omits the discovery prerequisite and the IPs are from private ranges. Using doc-only ranges avoids accidental copy/paste into real networks and keeps both prompts consistent with the Notes.

-**Example Prompts:**
-- "Once hosts are discovered for cluster my-cluster, set the API VIP to 192.168.1.100 and ingress VIP to 192.168.1.101"
-- "Configure cluster my-cluster with API VIP 10.0.0.10 and ingress VIP 10.0.0.11"
+**Example Prompts:**
+- "After hosts are discovered for cluster my-cluster, set the API VIP to 198.51.100.100 and the ingress VIP to 198.51.100.101"
+- "After hosts are discovered for cluster my-cluster, configure API VIP 203.0.113.10 and ingress VIP 203.0.113.11"
📜 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 sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d35dec2 and f51925d.

📒 Files selected for processing (3)
  • README.md (1 hunks)
  • doc/example_prompts.md (1 hunks)
  • server.py (1 hunks)
🧰 Additional context used
🪛 LanguageTool
doc/example_prompts.md

[grammar] ~51-~51: There might be a mistake here.
Context: ... to unknown subnets. Example Prompts: - "Once hosts are discovered for cluster m...

(QB_NEW_EN)


[grammar] ~52-~52: There might be a mistake here.
Context: ....168.1.100 and ingress VIP to 192.168.1.101" - "Configure cluster my-cluster with API V...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
README.md

102-102: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


103-103: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)

⏰ 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 (2)
README.md (1)

100-103: Clarity boost for users configuring VIPs.

The added note succinctly communicates applicability and timing; this should reduce “No suitable matching CIDR found for VIP” churn.

doc/example_prompts.md (1)

47-50: Notes look good and align with Assisted Installer behavior.

Applicability (multi-node + IMN) and timing (post-discovery) are clear.

Comment thread server.py
Comment thread doc/example_prompts.md Outdated
@zszabo-rh zszabo-rh force-pushed the tool_description_for_vips branch from f51925d to b8c44cd Compare August 26, 2025 08:45
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 26, 2025

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

Details

In response to this:

Summary by CodeRabbit

  • Documentation
  • Clarified VIP requirements: only for multi-node clusters with installer-managed networking; not required for single-node or user-managed networking.
  • Added a note to set VIPs only after hosts are discovered (post-Discovery ISO boot) to avoid “No suitable matching CIDR found for VIP” errors.
  • Added “Preconditions”/Notes to command/help text to make these requirements explicit; example prompts unchanged.

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
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 (1)
README.md (1)

100-103: Standardize list markers and enhance VIP note readability

  • Rename the lead-in from “Note:” to “Notes:” to reflect multiple points.
  • Switch the two dash-prefixed bullets to asterisk-prefixed bullets to satisfy markdownlint MD004 and match the surrounding list style.
  • Wrap the error message in backticks for clarity.

Apply this diff in README.md (lines 100–103):

-  Note:
-  - Use only for multi-node clusters with installer-managed networking. Single-node clusters and clusters with user-managed networking do not require VIPs.
-  - Ensure hosts are discovered first (after booting with the Discovery ISO) so that matching subnets are known; attempting to set VIPs earlier can result in errors such as "No suitable matching CIDR found for VIP".
+  Notes:
+  * Use only for multi-node clusters with installer-managed networking. Single-node clusters and clusters with user-managed networking do not require VIPs.
+  * Ensure hosts are discovered first (after booting with the Discovery ISO) so that matching subnets are known; attempting to set VIPs earlier can result in errors such as `No suitable matching CIDR found for VIP`.

Optional: for consistency with MD004, you may also convert the dash-prefixed sub-bullets under cluster_iso_download_url (lines 117–119) to asterisk-prefixed bullets.

📜 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 sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f51925d and b8c44cd.

📒 Files selected for processing (3)
  • README.md (1 hunks)
  • doc/example_prompts.md (1 hunks)
  • server.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • server.py
  • doc/example_prompts.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

102-102: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


103-103: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)

⏰ 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

@zszabo-rh zszabo-rh force-pushed the tool_description_for_vips branch from b8c44cd to 76fb675 Compare August 26, 2025 08:57
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 26, 2025

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

Details

In response to this:

Summary by CodeRabbit

  • Documentation
  • Clarified VIP requirements: only needed for multi-node clusters with installer-managed networking; not required for single-node or user-managed networking.
  • Added note to set VIPs only after hosts are discovered (post-Discovery ISO boot) to avoid “No suitable matching CIDR found for VIP” errors.
  • Added “Preconditions”/Notes to command/help text and example docs.

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 zszabo-rh requested a review from eranco74 August 26, 2025 10:15
@carbonin
Copy link
Copy Markdown
Collaborator

I'm okay with this. @eranco74 any concerns?

@eranco74
Copy link
Copy Markdown
Collaborator

I'm okay with this. @eranco74 any concerns?

We have it in the system prompt as well, I don't know if we need it here as well
rh-ecosystem-edge/assisted-chat#150

Comment thread server.py Outdated
@zszabo-rh zszabo-rh force-pushed the tool_description_for_vips branch from 76fb675 to e831a24 Compare August 26, 2025 16:21
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 26, 2025

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

Details

In response to this:

Summary by CodeRabbit

  • Documentation
  • Clarified VIP requirements: only needed for multi-node clusters when user-managed networking is disabled; not required for single-node or user-managed networking.
  • Added instruction to set VIPs only after hosts are discovered (post-Discovery ISO boot) to avoid “No suitable matching CIDR found for VIP” errors.
  • Added “Preconditions”/Notes to command/help text and example docs.

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 zszabo-rh closed this Aug 28, 2025
@zszabo-rh
Copy link
Copy Markdown
Contributor Author

system prompt update should do the trick by itself
rh-ecosystem-edge/assisted-chat#150

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. 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.

4 participants