Skip to content

ROB-1441: add ability to mock datetime prompt - #555

Merged
nherment merged 11 commits into
masterfrom
ROB-1441_ability_to_mock_prompt_datetime
Jun 23, 2025
Merged

nherment merged 11 commits into
masterfrom
ROB-1441_ability_to_mock_prompt_datetime

Conversation

@nherment

@nherment nherment commented Jun 23, 2025 •

Copy link
Copy Markdown
Contributor

Change related to #552 that:

  • Adds the ability to mock the datetime injected into the prompt.
  • Removes the datetime toolset because it is now redundant
  • Adds the ability to tag evals
  • Fixes a mypy issue where it gets confused between importing holmes/__init__py with holmes.py

@coderabbitai

coderabbitai Bot commented Jun 23, 2025 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@nherment has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 58 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 93cc9af and 777d9f0.

📒 Files selected for processing (3)
  • holmes/plugins/toolsets/__init__.py (0 hunks)
  • tests/llm/fixtures/test_ask_holmes/30_basic_promql_graph_cluster_memory/test_case.yaml (1 hunks)
  • tests/llm/test_ask_holmes.py (5 hunks)

"""

Walkthrough

This change centralizes current date and time rendering in prompts by introducing a shared Jinja2 template snippet, updates all references from holmes.py to holmes_cli.py, removes the DatetimeToolset and its tool, and adapts tests and documentation accordingly. Test infrastructure is enhanced for tagging and mocking datetime.

Changes

Files/Paths Change Summary
.github/workflows/build-and-test.yaml, .github/workflows/build-binaries-and-brew.yaml, Dockerfile Changed entry point from holmes.py to holmes_cli.py and set binary name; updated Docker ENTRYPOINT.
docs/api-keys.md, docs/installation.md Updated CLI invocation examples from holmes.py to holmes_cli.py.
holmes/core/tool_calling_llm.py Updated a TODO comment to reference holmes_cli.py instead of holmes.py.
holmes/plugins/prompts/_current_date_time.jinja2 Added: New shared template for current UTC date/time and timestamp.
holmes/plugins/prompts/generic_ask_conversation.jinja2
holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2
holmes/plugins/prompts/generic_investigation.jinja2
holmes/plugins/prompts/kubernetes_workload_ask.jinja2
holmes/plugins/prompts/kubernetes_workload_chat.jinja2
Replaced inline date/time output with {% include '_current_date_time.jinja2' %} for centralized rendering.
holmes/plugins/toolsets/datetime.py Removed: Entire module, including CurrentTime tool and DatetimeToolset.
holmes/plugins/toolsets/init.py Removed import and instantiation of DatetimeToolset from toolset loader.
holmes/plugins/toolsets/prometheus/prometheus_instructions.jinja2 Removed instruction about getting current time before Prometheus queries.
tests/llm/fixtures/test_ask_holmes/30_basic_promql_graph_cluster_memory/get_current_time.txt
tests/llm/fixtures/test_ask_holmes/31_basic_promql_graph_pod_memory/get_current_time.txt
tests/llm/fixtures/test_ask_holmes/32_basic_promql_graph_pod_cpu/get_current_time.txt
tests/llm/fixtures/test_ask_holmes/33_http_latency_graph/get_current_time.txt
tests/llm/fixtures/test_ask_holmes/34_memory_graph/get_current_time.txt
Removed: Static test fixtures for current time tool.
tests/llm/fixtures/test_ask_holmes/30_basic_promql_graph_cluster_memory/test_case.yaml Added generate_mocks: True to evaluation section.
tests/llm/fixtures/test_ask_holmes/43_current_datetime_from_prompt/test_case.yaml Added: New test case for prompt-based current date/time, with mocked datetime and tag.
tests/llm/test_ask_holmes.py Enhanced test case parameterization with tags; added datetime mocking for prompt tests; added debug print.
tests/llm/utils/constants.py Added ALLOWED_EVAL_TAGS type alias for allowed test tags.
tests/llm/utils/mock_utils.py Added mocked_date and tags fields to HolmesTestCase.
tests/llm/utils/tags.py Added: Utility functions for applying tags to test cases for pytest.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HolmesCLI
    participant Prompts
    participant Jinja2
    User->>HolmesCLI: Run prompt (e.g., ask for current date/time)
    HolmesCLI->>Prompts: Render prompt template
    Prompts->>Jinja2: Include _current_date_time.jinja2
    Jinja2-->>Prompts: Inject current UTC date/time and timestamp
    Prompts-->>HolmesCLI: Completed prompt with date/time info
    HolmesCLI-->>User: Output with current date/time context
Loading

Possibly related PRs

  • robusta-dev/holmesgpt#552: Refactors prompt templates to use a shared date/time snippet and removes the datetime toolset, directly related to managing time context in prompts.

Suggested labels

enhancement

Suggested reviewers

  • arikalon1
  • moshemorad
    """
✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@nherment nherment changed the title feat: add ability to mock datetime prompt ROB-1441: add ability to mock datetime prompt Jun 23, 2025
@nherment
nherment marked this pull request as ready for review June 23, 2025 10:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (3)
docs/installation.md (1)

106-106: Consistent entry point update for Poetry source run.
The example now uses holmes_cli.py. Consider standardizing the Python invocation (e.g., python vs. python3) across all docs to avoid confusion.

tests/llm/utils/mock_utils.py (1)

48-49: Consider adding validation for the mocked_date field.

The mocked_date field accepts any string, but the parsing logic in test_ask_holmes.py expects ISO format. Invalid formats could cause runtime errors during test execution.

Consider adding a field validator to ensure the date format is valid:

from pydantic import BaseModel, TypeAdapter, field_validator
+from datetime import datetime

class HolmesTestCase(BaseModel):
    id: str
    folder: str
    mocked_date: Optional[str] = None
    tags: Optional[list[ALLOWED_EVAL_TAGS]] = None
+
+    @field_validator('mocked_date')
+    @classmethod
+    def validate_mocked_date(cls, v):
+        if v is not None:
+            try:
+                datetime.fromisoformat(v.replace("Z", "+00:00"))
+            except ValueError as e:
+                raise ValueError(f"Invalid ISO datetime format: {e}")
+        return v
tests/llm/test_ask_holmes.py (1)

44-50: Simplify conditional logic.

The static analysis tool correctly identified unnecessary else after return. The code can be simplified.

    if iterations:
        return [
            add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
        ] * iterations
-    else:
-        return [
-            add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
-        ]
+    return [
+        add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
+    ]
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c447948 and 7868d46.

📒 Files selected for processing (26)
  • .github/workflows/build-and-test.yaml (1 hunks)
  • .github/workflows/build-binaries-and-brew.yaml (1 hunks)
  • Dockerfile (1 hunks)
  • docs/api-keys.md (1 hunks)
  • docs/installation.md (1 hunks)
  • holmes/core/tool_calling_llm.py (1 hunks)
  • holmes/plugins/prompts/_current_date_time.jinja2 (1 hunks)
  • holmes/plugins/prompts/generic_ask_conversation.jinja2 (1 hunks)
  • holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2 (1 hunks)
  • holmes/plugins/prompts/generic_investigation.jinja2 (1 hunks)
  • holmes/plugins/prompts/kubernetes_workload_ask.jinja2 (1 hunks)
  • holmes/plugins/prompts/kubernetes_workload_chat.jinja2 (1 hunks)
  • holmes/plugins/toolsets/datetime.py (1 hunks)
  • holmes/plugins/toolsets/prometheus/prometheus_instructions.jinja2 (0 hunks)
  • tests/llm/fixtures/test_ask_holmes/30_basic_promql_graph_cluster_memory/get_current_time.txt (0 hunks)
  • tests/llm/fixtures/test_ask_holmes/30_basic_promql_graph_cluster_memory/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/31_basic_promql_graph_pod_memory/get_current_time.txt (0 hunks)
  • tests/llm/fixtures/test_ask_holmes/32_basic_promql_graph_pod_cpu/get_current_time.txt (0 hunks)
  • tests/llm/fixtures/test_ask_holmes/33_http_latency_graph/get_current_time.txt (0 hunks)
  • tests/llm/fixtures/test_ask_holmes/34_memory_graph/get_current_time.txt (0 hunks)
  • tests/llm/fixtures/test_ask_holmes/43_current_datetime/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/43_current_datetime/toolsets.yaml (1 hunks)
  • tests/llm/test_ask_holmes.py (4 hunks)
  • tests/llm/utils/constants.py (1 hunks)
  • tests/llm/utils/mock_utils.py (2 hunks)
  • tests/llm/utils/tags.py (1 hunks)
💤 Files with no reviewable changes (6)
  • holmes/plugins/toolsets/prometheus/prometheus_instructions.jinja2
  • tests/llm/fixtures/test_ask_holmes/34_memory_graph/get_current_time.txt
  • tests/llm/fixtures/test_ask_holmes/32_basic_promql_graph_pod_cpu/get_current_time.txt
  • tests/llm/fixtures/test_ask_holmes/30_basic_promql_graph_cluster_memory/get_current_time.txt
  • tests/llm/fixtures/test_ask_holmes/31_basic_promql_graph_pod_memory/get_current_time.txt
  • tests/llm/fixtures/test_ask_holmes/33_http_latency_graph/get_current_time.txt
🧰 Additional context used
🪛 Pylint (3.3.7)
tests/llm/test_ask_holmes.py

[refactor] 43-50: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it

(R1705)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build (3.10)
  • GitHub Check: build (3.11)
  • GitHub Check: build (3.12)
  • GitHub Check: build (3.12)
  • GitHub Check: build (3.10)
  • GitHub Check: build (3.11)
  • GitHub Check: build (3.12)
🔇 Additional comments (22)
docs/api-keys.md (1)

139-139: Update CLI invocation script name.
The example has been correctly updated to reference holmes_cli.py instead of the old holmes.py. This aligns with the renamed entry point across build and documentation.

holmes/core/tool_calling_llm.py (1)

647-647: Updated TODO to reflect new CLI entry point.
The comment now correctly references moving templating into holmes_cli.py. No functional impact.

.github/workflows/build-and-test.yaml (1)

50-52: Switch PyInstaller entry script to holmes_cli.py.
The build step has been updated to use holmes_cli.py and explicitly set the binary name to holmes, keeping it in sync with other CI workflows.

.github/workflows/build-binaries-and-brew.yaml (1)

71-72: Align PyInstaller build step with new CLI script.
The release build now invokes PyInstaller on holmes_cli.py and names the artifact holmes, matching the test workflow and Dockerfile changes.

Dockerfile (2)

139-139: Ensure new entrypoint script is present in the build context.

Verify that holmes_cli.py exists at the repository root to avoid build failures during the COPY step.

#!/bin/bash
# Check for holmes_cli.py in the build context
if [ ! -f holmes_cli.py ]; then
  echo "ERROR: holmes_cli.py not found"
  exit 1
fi

141-141: Validate ENTRYPOINT updates across CI workflows and docs.

Confirm that all CI pipelines and documentation no longer reference the old holmes.py:

#!/bin/bash
# Search for obsolete references to holmes.py
rg -l "holmes.py" .github/workflows/ docs/ || echo "No holmes.py references found"
holmes/plugins/prompts/_current_date_time.jinja2 (1)

1-1: Centralize date/time snippet
This new template cleanly encapsulates the current UTC date/time and timestamp logic for reuse across all prompts.

holmes/plugins/prompts/generic_investigation.jinja2 (1)

6-6: Reuse _current_date_time snippet
Replacing the inline date/time block with a Jinja2 include promotes consistency and DRY across prompt templates.

tests/llm/utils/constants.py (2)

1-1: Import Literal for new type alias
Adding Literal enables defining a constrained set of allowed evaluation tags.


8-13: Define ALLOWED_EVAL_TAGS with Literal
This type alias enumerates valid evaluation categories ("logs", "context_window", "synthetic", "datetime") for strong typing in tests.

holmes/plugins/toolsets/datetime.py (1)

32-39: Disable datetime toolset by default
Changing enabled and is_default to False ensures the datetime toolset remains inactive unless explicitly enabled, aligning with the new test fixtures.

tests/llm/fixtures/test_ask_holmes/43_current_datetime/toolsets.yaml (1)

1-5: Add config to disable datetime toolset for test
Explicitly disabling the datetime toolset here guarantees controlled evaluation of prompt-based datetime handling without invoking the actual tool.

tests/llm/fixtures/test_ask_holmes/30_basic_promql_graph_cluster_memory/test_case.yaml (1)

6-6: LGTM: Test configuration enhancement

The addition of the generate_mocks: True flag aligns with the PR objectives to enhance mock generation capabilities for datetime testing. This configuration flag will likely enable deterministic behavior during test evaluation.

holmes/plugins/prompts/generic_ask_conversation.jinja2 (1)

6-6: LGTM: Centralized datetime injection

Replacing inline datetime variables with a reusable template include improves maintainability and enables consistent datetime mocking across all prompts.

Verify that the _current_date_time.jinja2 template provides equivalent functionality to the previous inline datetime variables:

#!/bin/bash
# Description: Verify the _current_date_time.jinja2 template exists and examine its content

# Check if the template file exists
fd "_current_date_time.jinja2" --type f

# Examine the template content to ensure it provides datetime variables
fd "_current_date_time.jinja2" --type f --exec cat {}
holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2 (1)

5-5: LGTM: Consistent datetime centralization

The replacement of inline datetime variables with the shared template include is consistent with the centralization strategy across all prompt templates.

holmes/plugins/prompts/kubernetes_workload_ask.jinja2 (1)

7-7: LGTM: Datetime centralization in workload template

The datetime template inclusion follows the established pattern and is positioned appropriately within the prompt structure.

holmes/plugins/prompts/kubernetes_workload_chat.jinja2 (1)

5-5: LGTM: Completes datetime centralization effort

This change completes the consistent centralization of datetime injection across all prompt templates, enabling unified mocking and maintenance.

tests/llm/fixtures/test_ask_holmes/43_current_datetime/test_case.yaml (1)

1-13: Well-structured datetime test case.

The test case properly defines a mocked datetime scenario with specific expected outputs. The ISO format for mocked_date is correct and the tags appropriately categorize this as a datetime and synthetic test.

tests/llm/utils/tags.py (2)

6-13: Clean and focused tagging utility implementation.

The get_tags function correctly converts tag strings to pytest marks using getattr, which is safe since tags are constrained by ALLOWED_EVAL_TAGS.


16-19: Proper pytest parameterization with tags.

The add_tags_to_eval function correctly creates pytest parameters with marks and IDs, enabling tagged test execution.

tests/llm/test_ask_holmes.py (2)

77-79: Good datetime mocking implementation.

The mocking setup correctly:

  • Patches the specific module where datetime is used
  • Preserves normal datetime instantiation via side_effect
  • Properly handles the now() method return value

72-82: ```shell
#!/bin/bash

List all Python files in the prompts package

find holmes/plugins/prompts -maxdepth 1 -type f -name "*.py" -print

Locate where ask_holmes is defined within the prompts package

rg -n "def ask_holmes" -g "holmes/plugins/prompts/*.py"

Inspect the file(s) containing ask_holmes for datetime import/usage

rg -n "import datetime" -g "holmes/plugins/prompts/.py"
rg -n "datetime." -g "holmes/plugins/prompts/
.py"


</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (2)
tests/llm/test_ask_holmes.py (2)

44-50: Refactor to remove unnecessary else clause.

The test case generation logic correctly implements the tagging functionality, but the else clause is unnecessary since both branches return similar structures.

Apply this diff to simplify the logic:

     iterations = int(os.environ.get("ITERATIONS", "0"))
     if iterations:
         return [
             add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
         ] * iterations
-    else:
-        return [
-            add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
-        ]
+    return [
+        add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
+    ]

203-203: Consider using logging instead of print for better debug control.

The debug print statement is useful for diagnostics, but using the logging module would provide better control over output in different environments.

Consider this approach:

+    import logging
+    logger = logging.getLogger(__name__)
+    
-    print(f"PROMPT {messages[0].get('content')}")
+    logger.debug(f"PROMPT {messages[0].get('content')}")

Or if you prefer to keep it as print for test visibility, consider adding a prefix:

-    print(f"PROMPT {messages[0].get('content')}")
+    print(f"** PROMPT **\n{messages[0].get('content')}")
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7868d46 and eddded4.

📒 Files selected for processing (4)
  • holmes/plugins/toolsets/__init__.py (0 hunks)
  • holmes/plugins/toolsets/datetime.py (0 hunks)
  • tests/llm/fixtures/test_ask_holmes/43_current_datetime_from_prompt/test_case.yaml (1 hunks)
  • tests/llm/test_ask_holmes.py (5 hunks)
💤 Files with no reviewable changes (2)
  • holmes/plugins/toolsets/init.py
  • holmes/plugins/toolsets/datetime.py
✅ Files skipped from review due to trivial changes (1)
  • tests/llm/fixtures/test_ask_holmes/43_current_datetime_from_prompt/test_case.yaml
🧰 Additional context used
🪛 Pylint (3.3.7)
tests/llm/test_ask_holmes.py

[refactor] 43-50: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it

(R1705)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: build (3.12)
  • GitHub Check: build (3.10)
  • GitHub Check: build (3.11)
  • GitHub Check: Pre-commit checks
  • GitHub Check: build (3.12)
🔇 Additional comments (1)
tests/llm/test_ask_holmes.py (1)

5-6: LGTM! Imports are appropriate for the new functionality.

The new imports support the datetime mocking and test tagging features being introduced.

Also applies to: 22-22

Comment thread tests/llm/test_ask_holmes.py
@nherment
nherment enabled auto-merge (squash) June 23, 2025 12:03

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (2)
tests/llm/test_ask_holmes.py (2)

43-50: Remove unnecessary else clause for cleaner code structure.

The else clause after the return statement is unnecessary and can be simplified by removing the else and de-indenting the code.

    if iterations:
        return [
            add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
        ] * iterations
-    else:
-        return [
-            add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
-        ]
+    return [
+        add_tags_to_eval(experiment_name, test_case) for test_case in test_cases
+    ]

208-208: Consider adding more descriptive debug information.

The debug print statement provides useful information, but could be more descriptive about what it's showing.

-    print(f"PROMPT {messages[0].get('content')}")
+    print(f"** PROMPT CONTENT **\n{messages[0].get('content')}")

This maintains consistency with other debug output formatting in the file.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eddded4 and 93cc9af.

📒 Files selected for processing (1)
  • tests/llm/test_ask_holmes.py (5 hunks)
🧰 Additional context used
🪛 Pylint (3.3.7)
tests/llm/test_ask_holmes.py

[refactor] 43-50: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it

(R1705)

🪛 GitHub Actions: Build and test HolmesGPT
tests/llm/test_ask_holmes.py

[error] 78-87: ruff-format: File was reformatted by the ruff formatter. Please run 'ruff --fix' or the equivalent to apply formatting changes.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (3.12)

Comment thread tests/llm/test_ask_holmes.py
@github-actions

Copy link
Copy Markdown
Contributor

Results of HolmesGPT evals

Test suite Test case Status
ask_holmes 01_how_many_pods ⚠️
ask_holmes 02_what_is_wrong_with_pod ✅
ask_holmes 02_what_is_wrong_with_pod_LOKI ✅
ask_holmes 03_what_is_the_command_to_port_forward ✅
ask_holmes 04_related_k8s_events ✅
ask_holmes 05_image_version ✅
ask_holmes 06_explain_issue ✅
ask_holmes 07_high_latency ✅
ask_holmes 07_high_latency_LOKI ✅
ask_holmes 08_sock_shop_frontend ✅
ask_holmes 09_crashpod ✅
ask_holmes 10_image_pull_backoff ✅
ask_holmes 11_init_containers ✅
ask_holmes 12_job_crashing ✅
ask_holmes 12_job_crashing_CORALOGIX ⚠️
ask_holmes 12_job_crashing_LOKI ⚠️
ask_holmes 13_pending_node_selector ✅
ask_holmes 14_pending_resources ✅
ask_holmes 15_failed_readiness_probe ✅
ask_holmes 16_failed_no_toolset_found ✅
ask_holmes 17_oom_kill ✅
ask_holmes 18_crash_looping_v2 ✅
ask_holmes 19_detect_missing_app_details ✅
ask_holmes 20_long_log_file_search ✅
ask_holmes 20_long_log_file_search_LOKI ✅
ask_holmes 21_job_fail_curl_no_svc_account ⚠️
ask_holmes 22_high_latency_dbi_down ✅
ask_holmes 23_app_error_in_current_logs ✅
ask_holmes 23_app_error_in_current_logs_LOKI ⚠️
ask_holmes 24_misconfigured_pvc ✅
ask_holmes 25_misconfigured_ingress_class ⚠️
ask_holmes 26_multi_container_logs ✅
ask_holmes 27_permissions_error_no_helm_tools ✅
ask_holmes 28_permissions_error_helm_tools_enabled ✅
ask_holmes 29_events_from_alert_manager ✅
ask_holmes 30_basic_promql_graph_cluster_memory ❌
ask_holmes 31_basic_promql_graph_pod_memory ✅
ask_holmes 32_basic_promql_graph_pod_cpu ✅
ask_holmes 33_http_latency_graph ✅
ask_holmes 34_memory_graph ✅
ask_holmes 35_tempo ✅
ask_holmes 36_argocd_find_resource ✅
ask_holmes 37_argocd_wrong_namespace ⚠️
ask_holmes 38_rabbitmq_split_head ✅
ask_holmes 39_failed_toolset ✅
ask_holmes 40_disabled_toolset ✅
ask_holmes 41_setup_argo ✅
ask_holmes 42_dns_issues_result_all_tools ⚠️
ask_holmes 42_dns_issues_result_new_tools ⚠️
ask_holmes 42_dns_issues_result_old_tools ⚠️
ask_holmes 42_dns_issues_steps_new_all_tools ⚠️
ask_holmes 42_dns_issues_steps_new_tools ⚠️
ask_holmes 42_dns_issues_steps_old_tools ⚠️
ask_holmes 43_current_datetime_from_prompt ✅
investigate 01_oom_kill ✅
investigate 02_crashloop_backoff ✅
investigate 03_cpu_throttling ✅
investigate 04_image_pull_backoff ✅
investigate 05_crashpod ✅
investigate 05_crashpod_LOKI ✅
investigate 06_job_failure ✅
investigate 07_job_syntax_error ✅
investigate 08_memory_pressure ✅
investigate 09_high_latency ✅
investigate 10_KubeDeploymentReplicasMismatch ✅
investigate 11_KubePodCrashLooping ✅
investigate 12_KubePodNotReady ✅
investigate 13_Watchdog ✅
investigate 14_tempo ✅

Legend

  • ✅ the test was successful
  • ⚠️ the test failed but is known to be flakky or known to fail
  • ❌ the test failed and should be fixed before merging the PR

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.

2 participants