Repository navigation
Conversation
…ersion Adds explicit guidance not to manually convert values in the query when using output_type formatting, as this causes double conversion. https://claude.ai/code/session_01Hc36WEwXrkTHFv9AJju431 Signed-off-by: Claude <noreply@anthropic.com>
Claude Code ReviewThis repository is configured for manual code reviews. Comment |
✅ Results of HolmesGPT evalsAutomatically triggered by commit f01fd02 on branch Results of HolmesGPT evals
Benchmark Comparison DetailsBaseline: latest ci-benchmark experiment on master Status: Success - 73 test/model combinations loaded Benchmark experiment:
No benchmark data available for comparison. Benchmark has no cost, total tokens, cached tokens data. Will appear after the next weekly benchmark run. Comparison indicators:
📖 Legend
🔄 Re-run evals manually
Option 1: Comment on this PR with Or with more options (one per line): Run evals on a different branch (e.g., master) for comparison:
Quick re-run: Use Option 2: Trigger via GitHub Actions UI → "Run workflow" Option 3: Add PR labels to include extra evals in automatic regression runs:
Examples: 🏷️ Valid tags
🤖 Valid models
Commands: CLI: |
|
✅ Docker images ready for
Use these tags to pull the images for testing. 📋 Copy commandsgcloud auth configure-docker us-central1-docker.pkg.dev
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:37ca3781
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:37ca3781 me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:37ca3781
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:37ca3781
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes-operator:37ca3781
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes-operator:37ca3781 me-west1-docker.pkg.dev/robusta-development/development/holmes-operator-dev:37ca3781
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-operator-dev:37ca3781Patch Helm values in one line (choose the chart you use): HolmesGPT chart: helm upgrade --install holmesgpt ./helm/holmes \
--set registry=me-west1-docker.pkg.dev/robusta-development/development \
--set image=holmes-dev:37ca3781 \
--set operator.registry=me-west1-docker.pkg.dev/robusta-development/development \
--set operator.image=holmes-operator-dev:37ca3781Robusta wrapper chart: helm upgrade --install robusta robusta/robusta \
--reuse-values \
--set holmes.registry=me-west1-docker.pkg.dev/robusta-development/development \
--set holmes.image=holmes-dev:37ca3781 \
--set holmes.operator.registry=me-west1-docker.pkg.dev/robusta-development/development \
--set holmes.operator.image=holmes-operator-dev:37ca3781 |
WalkthroughUpdated the parameter description for Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
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 |
✅ Deploy Preview for holmes-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🔬 CLI Performance Benchmark🟡 Startup Time (no LLM)Measures
🟡 Full CLI with LLMMeasures
PR: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@holmes/plugins/toolsets/prometheus/prometheus.py`:
- Around line 1563-1567: The docstring for the ToolParameter named "output_type"
in prometheus.py contains EN DASH characters; replace any EN DASH (–) with a
standard hyphen-minus (-) in that string literal to satisfy Ruff and Python
conventions, locating the string assigned to "output_type" (the ToolParameter
call) and editing the description value to use simple ASCII hyphens where
needed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 04ff8310-fc38-414d-9e95-17f40f7df046
📒 Files selected for processing (1)
holmes/plugins/toolsets/prometheus/prometheus.py
| "output_type": ToolParameter( | ||
| description="Specifies how to interpret the Prometheus result. Use 'Plain' for raw values, 'Bytes' to format byte values, 'Percentage' to scale 0–1 values into 0–100%, or 'CPUUsage' to convert values to cores (e.g., 500 becomes 500m, 2000 becomes 2).", | ||
| description="Specifies how to interpret the Prometheus result. Use 'Plain' for raw values, 'Bytes' to format byte values, 'Percentage' to scale 0–1 values into 0–100%, or 'CPUUsage' to convert values to cores (e.g., 500 becomes 500m, 2000 becomes 2). Do NOT convert on your own in the query. E.g. if setting output_type=Percentage it is a mistake to have * 100 in the query and convert numbers yourself in the query from 0-1 range to 0-100. This will cause a double conversion as further conversion happens at formatting time", | ||
| type="string", | ||
| required=True, | ||
| ), |
There was a problem hiding this comment.
Replace EN DASH with HYPHEN-MINUS for consistency.
The documentation improvement clearly explains the output_type behavior and warns against double conversion—well done. However, Ruff flags ambiguous EN DASH characters (–) that should be HYPHEN-MINUS (-) per Python string conventions.
🔧 Proposed fix
"output_type": ToolParameter(
- description="Specifies how to interpret the Prometheus result. Use 'Plain' for raw values, 'Bytes' to format byte values, 'Percentage' to scale 0–1 values into 0–100%, or 'CPUUsage' to convert values to cores (e.g., 500 becomes 500m, 2000 becomes 2). Do NOT convert on your own in the query. E.g. if setting output_type=Percentage it is a mistake to have * 100 in the query and convert numbers yourself in the query from 0-1 range to 0-100. This will cause a double conversion as further conversion happens at formatting time",
+ description="Specifies how to interpret the Prometheus result. Use 'Plain' for raw values, 'Bytes' to format byte values, 'Percentage' to scale 0-1 values into 0-100%, or 'CPUUsage' to convert values to cores (e.g., 500 becomes 500m, 2000 becomes 2). Do NOT convert on your own in the query. E.g. if setting output_type=Percentage it is a mistake to have * 100 in the query and convert numbers yourself in the query from 0-1 range to 0-100. This will cause a double conversion as further conversion happens at formatting time",
type="string",
required=True,
),🧰 Tools
🪛 Ruff (0.15.6)
[warning] 1564-1564: String contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF001)
[warning] 1564-1564: String contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF001)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@holmes/plugins/toolsets/prometheus/prometheus.py` around lines 1563 - 1567,
The docstring for the ToolParameter named "output_type" in prometheus.py
contains EN DASH characters; replace any EN DASH (–) with a standard
hyphen-minus (-) in that string literal to satisfy Ruff and Python conventions,
locating the string assigned to "output_type" (the ToolParameter call) and
editing the description value to use simple ASCII hyphens where needed.
Summary
Updated the documentation for the
output_typeparameter in the Prometheus toolset to clarify that users should not manually convert values in their queries when using output type formatting options.Key Changes
output_typeparameter description to explicitly warn against manual conversions in queries* 100in a query whenoutput_type=Percentageis set)Details
The change addresses a common user error where manual value conversions in Prometheus queries would conflict with the automatic conversions performed by the output type formatter. This could result in incorrect values being returned to users. The updated documentation now makes it clear that users should provide raw metric values and let the
output_typeparameter handle all necessary transformations.https://claude.ai/code/session_01Hc36WEwXrkTHFv9AJju431
Summary by CodeRabbit
Documentation