Skip to content

Pass through all parameters in holmes_chat action to Holmes server#1987

Merged
aantn merged 2 commits intomasterfrom
claude/holmes-passthrough-parameters-B1Ume
Jan 11, 2026
Merged

Pass through all parameters in holmes_chat action to Holmes server#1987
aantn merged 2 commits intomasterfrom
claude/holmes-passthrough-parameters-B1Ume

Conversation

@aantn
Copy link
Copy Markdown
Collaborator

@aantn aantn commented Jan 10, 2026

Instead of explicitly mapping each parameter, this change allows all parameters to be forwarded to Holmes, excluding only fields used locally (holmes_url, render_graph_images).

This enables Holmes clients and servers to add new parameters without requiring updates to Robusta

Changes:

  • HolmesChatParams: Added Config.extra = "allow" to accept extra fields
  • HolmesChatRequest: Added Config.extra = "allow" to forward extra fields
  • holmes_chat action: Use params.dict() with exclude to pass through all params

Instead of explicitly mapping each parameter, this change allows all
parameters to be forwarded to Holmes, excluding only fields used
locally (holmes_url, render_graph_images).

This enables Holmes clients and servers to add new parameters without
requiring updates to this middleware repository.

Changes:
- HolmesChatParams: Added Config.extra = "allow" to accept extra fields
- HolmesChatRequest: Added Config.extra = "allow" to forward extra fields
- holmes_chat action: Use params.dict() with exclude to pass through all params
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 10, 2026

Walkthrough

This PR implements forward-compatibility for Holmes parameters by enabling the HolmesChatParams and HolmesChatRequest models to accept and propagate arbitrary extra fields. The request construction in holmes_chat is refactored to use dictionary unpacking, allowing new Holmes parameters to flow through without code modifications.

Changes

Cohort / File(s) Summary
Model Configuration Updates
src/robusta/core/model/base_params.py, src/robusta/core/reporting/holmes.py
Added Pydantic Config class with extra = "allow" to HolmesChatParams and HolmesChatRequest to permit unspecified fields. Added docstring to HolmesChatRequest documenting forward-compatibility behavior.
Holmes Chat Request Construction
src/robusta/core/playbooks/internal/ai_integration.py
Refactored HolmesChatRequest initialization from explicit parameter list to dictionary unpacking, excluding holmes_url and render_graph_images. Enables dynamic parameter propagation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • RoiGlinik
  • Avi-Robusta
  • moshemorad
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change—enabling passthrough of all parameters to the Holmes server, which aligns perfectly with the changeset.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the rationale (forward compatibility), the three specific changes made, and the intended outcome.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/holmes-passthrough-parameters-B1Ume

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 42ed013 and 767139e.

📒 Files selected for processing (3)
  • src/robusta/core/model/base_params.py
  • src/robusta/core/playbooks/internal/ai_integration.py
  • src/robusta/core/reporting/holmes.py
🧰 Additional context used
🧬 Code graph analysis (3)
src/robusta/core/model/base_params.py (2)
src/robusta/core/reporting/holmes.py (1)
  • Config (55-56)
src/robusta/core/reporting/blocks.py (2)
  • Config (480-481)
  • Config (528-529)
src/robusta/core/playbooks/internal/ai_integration.py (1)
src/robusta/core/reporting/holmes.py (1)
  • HolmesChatRequest (38-56)
src/robusta/core/reporting/holmes.py (1)
src/robusta/core/model/base_params.py (1)
  • Config (209-210)
⏰ 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: run_tests
🔇 Additional comments (3)
src/robusta/core/model/base_params.py (1)

195-210: LGTM! Forward-compatibility pattern implemented correctly.

The addition of Config.extra = "allow" enables HolmesChatParams to accept and retain arbitrary extra fields, which will be forwarded to the Holmes server. The docstring clearly explains the intent.

Note that extra fields won't be validated by Pydantic, so ensure the Holmes server properly validates all incoming parameters.

src/robusta/core/playbooks/internal/ai_integration.py (1)

421-424: LGTM! Dict-based construction enables parameter pass-through.

The refactored approach correctly excludes locally-used fields (holmes_url, render_graph_images) while forwarding all other parameters to Holmes. This works in concert with the Config.extra = "allow" settings in both HolmesChatParams and HolmesChatRequest to enable forward-compatible parameter propagation.

The exclude list is accurate:

  • holmes_url is used for service discovery (line 411)
  • render_graph_images controls local rendering behavior (lines 427, 449)
src/robusta/core/reporting/holmes.py (1)

38-56: LGTM! Forward-compatibility enabled for HolmesChatRequest.

The Config.extra = "allow" setting enables HolmesChatRequest to accept additional fields from the dict unpacking in holmes_chat. The docstring clearly documents this behavior.

Note: HolmesIssueChatRequest (line 59) and HolmesWorkloadHealthRequest (line 98) inherit this behavior through subclassing. While the corresponding actions (holmes_issue_chat, holmes_workload_chat) currently use explicit field construction, they could benefit from similar dict-based construction if forward-compatibility is desired for those endpoints as well.


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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 10, 2026

Docker image ready for e1fcf01 (built in 3m 31s)

⚠️ Warning: does not support ARM (ARM images are built on release only - not on every PR)

Use this tag to pull the image for testing.

📋 Copy commands

⚠️ Temporary images are deleted after 30 days. Copy to a permanent registry before using them:

gcloud auth configure-docker us-central1-docker.pkg.dev
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/robusta-runner:e1fcf01
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/robusta-runner:e1fcf01 me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:e1fcf01
docker push me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:e1fcf01

Patch Helm values in one line:

helm upgrade --install robusta robusta/robusta \
  --reuse-values \
  --set runner.image=me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:e1fcf01

@aantn aantn enabled auto-merge (squash) January 11, 2026 15:41
@aantn aantn requested a review from arikalon1 January 11, 2026 15:41
@aantn aantn merged commit 2491420 into master Jan 11, 2026
7 checks passed
@aantn aantn deleted the claude/holmes-passthrough-parameters-B1Ume branch January 11, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants