Repository navigation
feat: Add kubevela to built-in toolsets - #1512
Conversation
✅ Deploy Preview for holmes-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds KubeVela support: documentation and navigation entries, a new Changes
Sequence DiagramsequenceDiagram
actor User
participant Holmes as Holmes CLI
participant Toolset as kubevela/core
participant Vela as vela CLI
participant K8s as Kubernetes API
User->>Holmes: ask "diagnose KubeVela app"
Holmes->>Toolset: select kubevela/core tools per instructions
Toolset->>Vela: run vela commands (ls / status / show / components / workflows / logs)
Vela->>K8s: query Application, Components, Pods, Workflows, CRDs
K8s-->>Vela: resource metadata, statuses, events, logs
Vela-->>Toolset: aggregated output
Toolset->>Holmes: structured findings (health, failures, suggested actions)
Holmes-->>User: diagnosis and recommended actions
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In `@docs/data-sources/builtin-toolsets/kubevela.md`:
- Around line 68-89: Remove the entire "## Capabilities" section from the
kubevela.md file: locate the "## Capabilities" heading and delete that heading
plus the following capabilites intro inclusion and the full markdown table
listing vela_app_list, vela_app_status, vela_app_show, vela_logs, vela_exec,
vela_component_list, vela_trait_list, vela_workflow_list, vela_workflow_status,
vela_workflow_logs, vela_addon_list, vela_addon_status, vela_definition_show,
vela_top, vela_dry_run, and vela_live_diff so the document no longer contains a
Capabilities section in accordance with the documentation guideline.
In `@holmes/plugins/toolsets/kubevela.yaml`:
- Around line 48-50: The vela_logs and vela_workflow_logs tool definitions
currently call `vela logs` without a line limit, risking unbounded output;
update the command templates for the "vela_logs" and "vela_workflow_logs"
entries to include a `--tail` limit (either a fixed safe default like `--tail
500` or a templated parameter such as `--tail {{ tail }}`) so returned logs are
capped and adjustable; modify the command strings for the vela_logs and
vela_workflow_logs symbols accordingly.
- Around line 92-94: The tool entry named "vela_top" uses the interactive
command string "vela top {{ app_name }} -n {{ namespace }}" which will hang in
non-interactive runs; replace or remove it. Update the "command" field for the
"vela_top" tool to a non-interactive alternative (for example use "kubectl top
pods --selector=app.kubernetes.io/name={{ app_name }} -n {{ namespace }}" or
"vela status {{ app_name }} -n {{ namespace }}" depending on desired output), or
remove the "vela_top" tool entry entirely if no suitable non-interactive
equivalent exists.
- Around line 44-46: The "vela_app_show" tool currently uses an incorrect
command ("vela show {{ app_name }} -n {{ namespace }}") which shows capability
docs and will fail for app names; update the "command" for the vela_app_show
entry to the correct runtime-inspection command "vela status {{ app_name }} -n
{{ namespace }}" if you want the app runtime status, or replace it with "kubectl
get application {{ app_name }} -n {{ namespace }} -o yaml" if the intent is to
return the application YAML/spec; adjust the "vela_app_show" command string
accordingly.
🧹 Nitpick comments (2)
holmes/plugins/toolsets/kubevela.yaml (1)
56-58: Thevela_port_forwardtool just echoes a message — consider removing it.This tool doesn't perform any actual diagnostic action; it only prints a suggestion. An LLM agent calling this tool will get no useful information back. If port-forwarding isn't actionable in this context, remove the tool to avoid wasting a tool-call turn.
Proposed fix
- - name: "vela_port_forward" - description: "Check port-forward capability for debugging (informational only, doesn't create actual port-forward)" - command: "echo 'Port-forward available with: vela port-forward {{ app_name }} -n {{ namespace }}{% if port %} {{ port }}{% endif %}'" -tests/llm/fixtures/test_ask_holmes/212_kubevela_app_diagnosis/test_case.yaml (1)
120-122: Minor: after_test cleanup uses hardcoded values instead of the variables from before_test.Lines 121–122 hardcode
payment-serviceandapp-212rather than using variables. This is fine for correctness sinceafter_testruns as a separate shell, but note that if you rename the app or namespace, both blocks need updating.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@holmes/plugins/toolsets/kubevela.yaml`:
- Around line 88-90: The vela_top tool entry uses the wrong pod label selector;
update the command string for the "vela_top" entry to use KubeVela's label key
app.oam.dev/name instead of app.kubernetes.io/name (e.g., change the command
value in the vela_top definition to use -l app.oam.dev/name={{ app_name }} -n {{
namespace }}); ensure only the label key is changed so pod filtering returns
KubeVela application pods.
- Around line 48-50: The vela_logs tool entry currently runs "vela logs ..." and
can hang on interactive prompts; update the command string for the vela_logs
entry to append the non-interactive flag "-y" (or "--yes") so it becomes "...
--tail {{ tail | default(500) }} -y"; also consider adding optional pod/cluster
selectors if available (e.g. --pod/--cluster template variables) to further
avoid ambiguity and interactive selection when multiple pods/resources match.
🧹 Nitpick comments (1)
holmes/plugins/toolsets/kubevela.yaml (1)
52-54:vela_port_forwardtool provides no diagnostic value.This tool just echoes a string telling the user how to run port-forward manually. It doesn't execute any inspection or return any data. Consider removing it — the LLM can suggest the command in its response without needing a dedicated tool.
Proposed fix — remove the tool
- - name: "vela_port_forward" - description: "Check port-forward capability for debugging (informational only, doesn't create actual port-forward)" - command: "echo 'Port-forward available with: vela port-forward {{ app_name }} -n {{ namespace }}{% if port %} {{ port }}{% endif %}'" -
Thank you @arikalon1 The comments are addressed. Please review. |
Removed the Robusta Helm Chart section from the KubeVela documentation.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/data-sources/builtin-toolsets/kubevela.md`:
- Line 3: The intro sentence currently reads "By enabling this toolset,
HolmesGPT will be able to diagnose KubeVela applications, inspect components,
check workflow execution, and analyze deployment issues using the Open
Application Model (OAM)"; change it to describe the toolset's capabilities
(e.g., "Provides diagnostics for KubeVela applications, component inspection,
workflow execution checks, and deployment issue analysis using the Open
Application Model (OAM)") so it focuses on the toolset rather than Holmes's
behavior; update the sentence in kubevela.md where that exact line appears and
keep the same list of capabilities and OAM reference.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/data-sources/builtin-toolsets/kubevela.md`:
- Around line 23-29: The fenced YAML example is being interpreted as an indented
code block and triggers MD046; open
docs/data-sources/builtin-toolsets/kubevela.md and replace the indented block
with a proper fenced code block (use ```yaml before the snippet and ``` after)
containing the toolsets: / kubevela/core: / enabled: true lines, or
alternatively add a markdownlint-disable MD046 HTML comment immediately before
and re-enable after the fenced block to suppress linting; ensure the snippet
includes the language tag (yaml) so it stays a fenced block for the linter and
readers, and reference the YAML keys "toolsets" and "kubevela/core" to locate
the snippet.
New Features Added a KubeVela toolset exposing comprehensive vela CLI commands for application management, component inspection, workflow execution, trait configuration, addon management, and troubleshooting capabilities including status checks, logs, resource usage monitoring, dry-run previews, and live-diff comparisons. Documentation Added comprehensive KubeVela documentation (docs/data-sources/builtin-toolsets/kubevela.md) including prerequisites, CLI installation instructions, configuration examples for both Holmes CLI and Robusta Helm Chart deployments, common use cases, and a complete capabilities table listing all available tools. Integrated KubeVela into site navigation (.nav.yml) and toolset index page. Tests Added LLM evaluation test (tests/llm/fixtures/test_ask_holmes/212_kubevela_app_diagnosis/) with complete end-to-end scenario covering KubeVela installation, intentional application deployment failure (bad container image), verification of Holmes's diagnostic capabilities, and proper cleanup procedures. Test includes robust setup verification with retry loops and detailed error reporting. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added KubeVela toolset support for inspecting applications, components, traits, workflows, logs, port-forward info, addons, definitions, resource usage, and diff/dry-run checks. * **Documentation** * Added KubeVela integration guide with installation, configuration, usage examples, and a new navigation entry. * **Tests** * Added an end-to-end test fixture for KubeVela application diagnosis and a test toolset configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: arik <alon.arik@gmail.com> Signed-off-by: Mohse Morad <moshemorad12340@gmail.com>
New Features Added a KubeVela toolset exposing comprehensive vela CLI commands for application management, component inspection, workflow execution, trait configuration, addon management, and troubleshooting capabilities including status checks, logs, resource usage monitoring, dry-run previews, and live-diff comparisons. Documentation Added comprehensive KubeVela documentation (docs/data-sources/builtin-toolsets/kubevela.md) including prerequisites, CLI installation instructions, configuration examples for both Holmes CLI and Robusta Helm Chart deployments, common use cases, and a complete capabilities table listing all available tools. Integrated KubeVela into site navigation (.nav.yml) and toolset index page. Tests Added LLM evaluation test (tests/llm/fixtures/test_ask_holmes/212_kubevela_app_diagnosis/) with complete end-to-end scenario covering KubeVela installation, intentional application deployment failure (bad container image), verification of Holmes's diagnostic capabilities, and proper cleanup procedures. Test includes robust setup verification with retry loops and detailed error reporting. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added KubeVela toolset support for inspecting applications, components, traits, workflows, logs, port-forward info, addons, definitions, resource usage, and diff/dry-run checks. * **Documentation** * Added KubeVela integration guide with installation, configuration, usage examples, and a new navigation entry. * **Tests** * Added an end-to-end test fixture for KubeVela application diagnosis and a test toolset configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: arik <alon.arik@gmail.com> Signed-off-by: Mohse Morad <moshemorad12340@gmail.com>
New Features
Added a KubeVela toolset exposing comprehensive vela CLI commands for application management, component inspection, workflow execution, trait configuration, addon management, and troubleshooting capabilities including status checks, logs, resource usage monitoring, dry-run previews, and live-diff comparisons.
Documentation
Added comprehensive KubeVela documentation (docs/data-sources/builtin-toolsets/kubevela.md) including prerequisites, CLI installation instructions, configuration examples for both Holmes CLI and Robusta Helm Chart deployments, common use cases, and a complete capabilities table listing all available tools. Integrated KubeVela into site navigation (.nav.yml)
and toolset index page.
Tests
Added LLM evaluation test (tests/llm/fixtures/test_ask_holmes/212_kubevela_app_diagnosis/) with complete end-to-end scenario covering KubeVela installation, intentional application deployment failure (bad container image), verification of Holmes's diagnostic capabilities, and proper cleanup procedures. Test includes robust setup verification with retry loops and detailed error reporting.
Summary by CodeRabbit
New Features
Documentation
Tests