Add metadata to HolmesStatus - #1591
Conversation
✅ Deploy Preview for holmes-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughAdded a new public dataclass Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 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. 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 |
8a56202 to
016369f
Compare
|
✅ 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:baadda2a
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:baadda2a me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:baadda2a
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:baadda2a
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes-operator:baadda2a
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes-operator:baadda2a me-west1-docker.pkg.dev/robusta-development/development/holmes-operator-dev:baadda2a
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-operator-dev:baadda2aPatch 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:baadda2a \
--set operator.registry=me-west1-docker.pkg.dev/robusta-development/development \
--set operator.image=holmes-operator-dev:baadda2aRobusta 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:baadda2a \
--set holmes.operator.registry=me-west1-docker.pkg.dev/robusta-development/development \
--set holmes.operator.image=holmes-operator-dev:baadda2a |
📂 Previous Runs📜 Run @ 6c3cc5f (#22273537865)✅ Results of HolmesGPT evalsAutomatically triggered by commit 6c3cc5f on branch Results of HolmesGPT evals
📜 Run @ bdc7950 (#22218462748)✅ Results of HolmesGPT evalsAutomatically triggered by commit bdc7950 on branch Results of HolmesGPT evals
📜 Run @ 570fb5b (#22217985877)✅ Results of HolmesGPT evalsAutomatically triggered by commit 570fb5b on branch Results of HolmesGPT evals
📜 Run @ 98761d5 (#22189752327)✅ Results of HolmesGPT evalsAutomatically triggered by commit 98761d5 on branch Results of HolmesGPT evals
📜 Run @ 433fb92 (#22189591032)✅ Results of HolmesGPT evalsAutomatically triggered by commit 433fb92 on branch Results of HolmesGPT evals
✅ Results of HolmesGPT evalsAutomatically triggered by commit 9faef2a on branch Results of HolmesGPT evals
📖 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
Commands: CLI: |
🔬 CLI Performance Benchmark🟡 Startup Time (no LLM)Measures
🟡 Full CLI with LLMMeasures
PR: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
holmes/utils/holmes_status.py (1)
9-11: Consider adding a class-level docstring toHolmesMetadata.The field name is self-explanatory, but a brief docstring clarifying the purpose of this metadata object (e.g., what it represents in the context of the Holmes status DB entry) would align with the guideline of explaining why rather than what.
✏️ Suggested addition
`@dataclass` class HolmesMetadata: + """Metadata attached to each Holmes status DB entry, describing cluster-level feature flags.""" is_robusta_ai_enabled: boolAs per coding guidelines: "Write clear, concise comments that explain 'why' rather than 'what'."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holmes/utils/holmes_status.py` around lines 9 - 11, Add a concise class-level docstring to the dataclass HolmesMetadata that explains why this metadata exists and how it is used in the Holmes status DB entry (e.g., it represents status flags for integrations/features such as whether Robusta AI is enabled), and mention the meaning of the is_robusta_ai_enabled field for clarity; place the docstring immediately under the class declaration so it’s discoverable by tools and developers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@holmes/utils/holmes_status.py`:
- Around line 9-11: Add a concise class-level docstring to the dataclass
HolmesMetadata that explains why this metadata exists and how it is used in the
Holmes status DB entry (e.g., it represents status flags for
integrations/features such as whether Robusta AI is enabled), and mention the
meaning of the is_robusta_ai_enabled field for clarity; place the docstring
immediately under the class declaration so it’s discoverable by tools and
developers.
Signed-off-by: Mohse Morad <moshemorad12340@gmail.com>
Signed-off-by: Mohse Morad <moshemorad12340@gmail.com>
433fb92 to
98761d5
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
holmes/utils/holmes_status.py (1)
29-31: Pass native Python objects instead of JSON strings for themodelandmetadatafieldsWhen using Supabase's Python client with
jsonbcolumns, pass dict/list objects directly rather thanjson.dumps()strings. Usingjson.dumps()stores the values as JSONB string scalars instead of JSONB objects, which breaks JSON operators and queries. Bothconfig.get_models_list()(returnsList[str]) andasdict(metadata)(returnsdict) should be passed directly to the upsert payload.♻️ Suggested change
- "model": json.dumps(config.get_models_list()), + "model": config.get_models_list(), "version": get_version(), - "metadata": json.dumps(asdict(metadata)), + "metadata": asdict(metadata),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@holmes/utils/holmes_status.py` around lines 29 - 31, The upsert payload is JSON-encoding values for the "model" and "metadata" fields which causes Supabase jsonb columns to store string scalars; instead, stop calling json.dumps and pass the native Python objects returned by config.get_models_list() (List[str]) and asdict(metadata) (dict) directly in holmes_status.py where the payload is built (the dict with keys "model", "version", "metadata"); keep get_version() unchanged but replace "model": json.dumps(config.get_models_list()) and "metadata": json.dumps(asdict(metadata)) with the raw values so Supabase stores proper jsonb objects/arrays.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@holmes/utils/holmes_status.py`:
- Around line 29-31: The upsert payload is JSON-encoding values for the "model"
and "metadata" fields which causes Supabase jsonb columns to store string
scalars; instead, stop calling json.dumps and pass the native Python objects
returned by config.get_models_list() (List[str]) and asdict(metadata) (dict)
directly in holmes_status.py where the payload is built (the dict with keys
"model", "version", "metadata"); keep get_version() unchanged but replace
"model": json.dumps(config.get_models_list()) and "metadata":
json.dumps(asdict(metadata)) with the raw values so Supabase stores proper jsonb
objects/arrays.
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Holmes status updates now include a metadata field indicating AI feature availability (e.g., Robusta AI enablement) and whether additional system prompts are supported, improving visibility into runtime capabilities and configuration. * Metadata is attached to status payloads so downstream tools can make informed decisions based on current feature support. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Mohse Morad <moshemorad12340@gmail.com>
Summary by CodeRabbit