Skip to content

add missing namespace cleanup to evals - #752

Merged
aantn merged 1 commit into
masterfrom
fix-eval-cleanup
Jul 29, 2025
Merged

aantn merged 1 commit into
masterfrom
fix-eval-cleanup

Conversation

@aantn

@aantn aantn commented Jul 29, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@aantn
aantn requested a review from pavangudiwada July 29, 2025 15:15
@coderabbitai

coderabbitai Bot commented Jul 29, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

The cleanup procedures in multiple test case YAML files were updated to include commands that delete the corresponding Kubernetes namespaces after test execution. This change ensures that, in addition to removing specific resources like jobs, manifests, and secrets, the entire namespace and all its contained resources are also deleted during test teardown.

Changes

Cohort / File(s) Change Summary
Test Cleanup: Namespace Deletion Enhancement
tests/llm/fixtures/test_ask_holmes/12_job_crashing/test_case.yaml, tests/llm/fixtures/test_ask_holmes/20_long_log_file_search/test_case.yaml, tests/llm/fixtures/test_ask_holmes/66_http_error_needle/test_case.yaml, tests/llm/fixtures/test_ask_holmes/67_performance_degradation/test_case.yaml, tests/llm/fixtures/test_ask_holmes/68_cascading_failures/test_case.yaml, tests/llm/fixtures/test_ask_holmes/69_rate_limit_exhaustion/test_case.yaml, tests/llm/fixtures/test_ask_holmes/71_connection_pool_starvation/test_case.yaml, tests/llm/fixtures/test_ask_holmes/74_config_change_impact/test_case.yaml, tests/llm/fixtures/test_ask_holmes/75_network_flapping/test_case.yaml
Added commands in the after_test section to delete the relevant Kubernetes namespace after test completion, ensuring full cleanup of all namespace resources.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • Sheeproid

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-eval-cleanup

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 generate unit tests to generate unit tests for 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.

@github-actions

Copy link
Copy Markdown
Contributor

Results of HolmesGPT evals

  • ask_holmes: 26/34 test cases were successful, 0 regressions, 1 skipped, 7 mock failures
Test suite Test case Status
ask 01_how_many_pods ✅
ask 02_what_is_wrong_with_pod 🔧
ask 03_what_is_the_command_to_port_forward 🔧
ask 04_related_k8s_events ↪️
ask 05_image_version 🔧
ask 09_crashpod ✅
ask 10_image_pull_backoff 🔧
ask 11_init_containers ✅
ask 13_pending_node_selector ✅
ask 14_pending_resources ✅
ask 15_failed_readiness_probe ✅
ask 17_oom_kill ✅
ask 18_crash_looping_v2 ✅
ask 19_detect_missing_app_details 🔧
ask 24_misconfigured_pvc ✅
ask 28_permissions_error ✅
ask 29_events_from_alert_manager ✅
ask 39_failed_toolset 🔧
ask 41_setup_argo0 ✅
ask 41_setup_argo1 ✅
ask 42_dns_issues_steps_new_tools 🔧
ask 43_current_datetime_from_prompt ✅
ask 45_fetch_deployment_logs_simple ✅
ask 51_logs_summarize_errors 🔧
ask 53_logs_find_term ✅
ask 54_not_truncated_when_getting_pods ✅
ask 59_label_based_counting ✅
ask 60_count_less_than 🔧
ask 61_exact_match_counting ✅
ask 63_fetch_error_logs_no_errors ✅
ask 79_configmap_mount_issue 🔧
ask 83_secret_not_found 🔧
ask 89_runbook_missing_cloudwatch 🔧
ask 90_runbook_basic_selection 🔧

Legend

  • ✅ the test was successful
  • ↪️ the test was skipped
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🔧 the test failed due to mock data issues (not a code regression)
  • ❌ the test failed and should be fixed before merging the PR

@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

🔭 Outside diff range comments (3)
tests/llm/fixtures/test_ask_holmes/71_connection_pool_starvation/test_case.yaml (1)

8-13: Rename the namespace to follow the app-<id> convention.

All LLM tests must operate in a dedicated namespace named app-<testid> (see long-term learnings).
Using namespace-71 risks clashes with parallel test runs that might pick the same numeric suffix but a different prefix.

Diff sketch:

-  kubectl create namespace namespace-71 || true
+  kubectl create namespace app-71 || true
...
-  -n namespace-71 --dry-run=client -o yaml | kubectl apply -f -
+  -n app-71 --dry-run=client -o yaml | kubectl apply -f -
...
-  kubectl delete secret backend-service-logs-script -n namespace-71 --ignore-not-found
+  kubectl delete secret backend-service-logs-script -n app-71 --ignore-not-found
-  kubectl delete namespace namespace-71 --ignore-not-found
+  kubectl delete namespace app-71 --ignore-not-found

Also applies to: 16-18

tests/llm/fixtures/test_ask_holmes/69_rate_limit_exhaustion/test_case.yaml (1)

10-13: Rename resources to neutral identifiers to avoid leaking test intent

Names like api-limiter-logs-script (and any api-limiter pods in the manifest) reveal the rate-limit scenario to the LLM, violating the fixture guideline that resource names must not hint at the underlying issue.
Switch to neutral, unique names (e.g., giant-narwhal-script) and update references throughout the fixture.

tests/llm/fixtures/test_ask_holmes/68_cascading_failures/test_case.yaml (1)

9-11: Enforce app-<id> namespace naming in LLM fixtures

Script output reveals multiple tests still creating namespaces outside the app-<testid> convention—e.g., namespace-66, ask-holmes-namespace-51, production-62, staging-63, ts-46, rabbitmq, 28-test, etc. This breaks our guideline and risks collisions when suites run in parallel.

• Rename in tests/llm/fixtures/test_ask_holmes/68_cascading_failures/test_case.yaml (lines 9–11):

- kubectl create namespace namespace-68 || true
+ kubectl create namespace app-68 || true

(and update any matching kubectl delete namespace namespace-68 calls)

• Apply the same refactor to all non-app-<id> entries found by:

rg --no-heading -N 'create namespace ' tests/llm/fixtures | grep -v 'app-' 

—e.g. tests/…/66_http_error_needle, …/67_performance_degradation, …/69_rate_limit_exhaustion, …/70_memory_leak_detection, …/71_connection_pool_starvation, …/73_time_window_anomaly, …/74_config_change_impact, …/75_network_flapping, tests with ask-holmes-namespace-*, production-*, staging-*, ts-*, rabbitmq, and 28-test.

Ensuring every fixture uses app-<testid> will prevent namespace collisions across parallel runs.

🧹 Nitpick comments (6)
tests/llm/fixtures/test_ask_holmes/74_config_change_impact/test_case.yaml (1)

11-13: Consider switching to the canonical per-test namespace pattern

Internal conventions (see previous PR feedback) recommend app-<id> namespaces (e.g., app-74) to avoid clashes with external environments that may use a namespace-* naming scheme. Future migrations or parallel test runs will be safer if this test follows the same pattern.

No action required for this PR, but worth aligning in the next refactor pass.

Also applies to: 19-21

tests/llm/fixtures/test_ask_holmes/75_network_flapping/test_case.yaml (1)

16-19: Namespace-level delete renders previous resource deletes redundant—simplify & speed up teardown

Since deleting the namespace (kubectl delete namespace namespace-75) already garbage-collects every namespaced resource, the preceding two commands are no longer needed and only slow the pipeline (they also risk NotFound noise for the manifest). A more concise, resilient block would be:

-after_test: |
-  kubectl delete -f ./manifest.yaml
-  kubectl delete secret frontend-logs-script -n namespace-75 --ignore-not-found
-  kubectl delete namespace namespace-75 --ignore-not-found
+after_test: |
+  # One command is enough; --ignore-not-found avoids noise, --wait=false speeds CI
+  kubectl delete namespace namespace-75 --ignore-not-found --wait=false

This keeps teardown idempotent, avoids duplicate work, and shortens CI wall-clock time.

tests/llm/fixtures/test_ask_holmes/71_connection_pool_starvation/test_case.yaml (1)

15-18: Redundant deletions—namespace removal already covers child resources.

Deleting manifest.yaml and the secret right before deleting the whole namespace is unnecessary; namespace deletion tears down everything inside it.
Keeping only the namespace deletion simplifies teardown and reduces runtime.

-  kubectl delete -f ./manifest.yaml
-  kubectl delete secret backend-service-logs-script -n <namespace> --ignore-not-found
-  kubectl delete namespace <namespace> --ignore-not-found
+  kubectl delete namespace <namespace> --ignore-not-found

(Replace <namespace> with the updated name once the rename is applied.)

tests/llm/fixtures/test_ask_holmes/20_long_log_file_search/test_case.yaml (1)

12-15: You can drop the per-resource deletes for a leaner teardown.

Once the namespace deletion is in place, the preceding kubectl delete -f ./manifest.yaml and kubectl delete secret … commands are redundant—the namespace garbage-collection will wipe everything inside it. Removing them will shorten test duration and avoid double work:

 after_test: |
-  kubectl delete -f ./manifest.yaml
-  kubectl delete secret network-connector-logs-script -n app-20 --ignore-not-found
   kubectl delete namespace app-20 --ignore-not-found
tests/llm/fixtures/test_ask_holmes/69_rate_limit_exhaustion/test_case.yaml (1)

16-18: Namespace deletion added – streamline teardown & wait for completion

Deleting the namespace is the right call, but once you do that, the explicit secret deletion is unnecessary. Removing it cuts one API call and reduces teardown time.
Also add --wait so the command blocks until the namespace is fully removed, preventing resource collisions in subsequent tests.

   kubectl delete -f ./manifest.yaml
-  kubectl delete secret api-limiter-logs-script -n namespace-69 --ignore-not-found
-  kubectl delete namespace namespace-69 --ignore-not-found
+  kubectl delete namespace namespace-69 --wait --ignore-not-found
tests/llm/fixtures/test_ask_holmes/67_performance_degradation/test_case.yaml (1)

18-18: Good addition, but consider non-blocking deletion

Adding a namespace-wide delete guarantees full cleanup.
However, kubectl delete namespace is synchronous and can keep the test runner waiting ~45-60 s until the namespace reaches Terminating. Using --wait=false (followed by a short sleep if needed) can shave seconds off every test without sacrificing correctness.

-kubectl delete namespace namespace-67 --ignore-not-found
+kubectl delete namespace namespace-67 --ignore-not-found --wait=false
+# Optionally give the API server a moment to mark it terminating
+sleep 2
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2ea223f and d493ebb.

📒 Files selected for processing (9)
  • tests/llm/fixtures/test_ask_holmes/12_job_crashing/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/20_long_log_file_search/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/66_http_error_needle/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/67_performance_degradation/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/68_cascading_failures/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/69_rate_limit_exhaustion/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/71_connection_pool_starvation/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/74_config_change_impact/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/75_network_flapping/test_case.yaml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
tests/llm/fixtures/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

tests/llm/fixtures/**/*: Mock data: tests/llm/fixtures/{test_name}/
All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests
Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

Files:

  • tests/llm/fixtures/test_ask_holmes/71_connection_pool_starvation/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/66_http_error_needle/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/75_network_flapping/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/68_cascading_failures/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/69_rate_limit_exhaustion/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/20_long_log_file_search/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/67_performance_degradation/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/12_job_crashing/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/74_config_change_impact/test_case.yaml
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/**/*.py : Each LLM test must use a dedicated namespace app-<testid> (e.g., app-01, app-02) to prevent conflicts when tests run simultaneously
tests/llm/fixtures/test_ask_holmes/71_connection_pool_starvation/test_case.yaml (2)

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

tests/llm/fixtures/test_ask_holmes/66_http_error_needle/test_case.yaml (3)

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

Learnt from: Sheeproid
PR: #586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.

tests/llm/fixtures/test_ask_holmes/75_network_flapping/test_case.yaml (2)

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

tests/llm/fixtures/test_ask_holmes/68_cascading_failures/test_case.yaml (2)

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

tests/llm/fixtures/test_ask_holmes/69_rate_limit_exhaustion/test_case.yaml (5)

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests

Learnt from: Sheeproid
PR: #586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/**/*.py : Each LLM test must use a dedicated namespace app- (e.g., app-01, app-02) to prevent conflicts when tests run simultaneously

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Mock data: tests/llm/fixtures/{test_name}/

tests/llm/fixtures/test_ask_holmes/20_long_log_file_search/test_case.yaml (4)

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/**/*.py : Each LLM test must use a dedicated namespace app- (e.g., app-01, app-02) to prevent conflicts when tests run simultaneously

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests

Learnt from: Sheeproid
PR: #586
File: tests/llm/fixtures/test_ask_holmes/03_what_is_the_command_to_port_forward/test_case.yaml:4-4
Timestamp: 2025-07-02T10:27:17.231Z
Learning: In LLM-as-judge test cases for HolmesGPT, expected outputs should be descriptive rather than prescriptive when testing for flexible responses like port numbers. Using specific values in expected outputs can cause unnecessary test failures when the AI generates different but equally valid responses.

tests/llm/fixtures/test_ask_holmes/67_performance_degradation/test_case.yaml (2)

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests

tests/llm/fixtures/test_ask_holmes/12_job_crashing/test_case.yaml (4)

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : Never use resource names that hint at the problem or expected behavior (e.g., avoid broken-pod, test-project-that-does-not-exist, crashloop-app). Use neutral names that don't give away what the LLM should discover

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/fixtures/**/* : All pod names must be unique across tests (e.g., giant-narwhal, blue-whale, sea-turtle) - never reuse pod names between tests

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to tests/llm/**/*.py : Each LLM test must use a dedicated namespace app- (e.g., app-01, app-02) to prevent conflicts when tests run simultaneously

Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: LLM evaluation tests run automatically in CI

⏰ 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). (3)
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks
  • GitHub Check: Pre-commit checks
🔇 Additional comments (7)
tests/llm/fixtures/test_ask_holmes/12_job_crashing/test_case.yaml (1)

15-15: Namespace deletion ensures full cleanup – nice catch

Adding kubectl delete namespace app-12 --ignore-not-found guarantees the test environment is completely torn down, preventing cross-test interference and dangling resources in CI.

tests/llm/fixtures/test_ask_holmes/66_http_error_needle/test_case.yaml (1)

18-18: Complete teardown handled correctly

Including kubectl delete namespace namespace-66 --ignore-not-found finalizes resource cleanup and avoids leftovers that could pollute subsequent runs.

tests/llm/fixtures/test_ask_holmes/74_config_change_impact/test_case.yaml (1)

19-21: Namespace deletion step added – good catch

Adding an explicit kubectl delete namespace namespace-74 --ignore-not-found ensures cluster hygiene and prevents flake-inducing residue between tests. Ordering is correct (manifests → secret → namespace).

tests/llm/fixtures/test_ask_holmes/20_long_log_file_search/test_case.yaml (1)

15-15: Namespace deletion added – looks good.

Adding kubectl delete namespace app-20 --ignore-not-found guarantees a full teardown of all resources created during the test.

tests/llm/fixtures/test_ask_holmes/69_rate_limit_exhaustion/test_case.yaml (1)

8-9: Namespace name deviates from app-<id> convention

Fixtures are expected to use the app-<testid> pattern (e.g., app-69) for predictable isolation. namespace-69 works functionally but breaks that convention and may trip tooling that relies on it.
Please rename the namespace and all references accordingly, or confirm that the deviation is intentional.

tests/llm/fixtures/test_ask_holmes/67_performance_degradation/test_case.yaml (1)

10-13: Confirmed resource-name uniqueness—no collisions found

Verified that both api-gateway-logs-script and api-gateway only appear under tests/llm/fixtures/test_ask_holmes/67_performance_degradation with no occurrences in other fixtures. No renaming required.

tests/llm/fixtures/test_ask_holmes/68_cascading_failures/test_case.yaml (1)

17-19: Good call — full namespace cleanup avoids resource leakage

Adding an explicit kubectl delete namespace namespace-68 --ignore-not-found guarantees all child resources are wiped, preventing cross-test interference and freeing cluster quota.

@aantn
aantn enabled auto-merge (squash) July 29, 2025 15:25

@pavangudiwada pavangudiwada 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.

LGTM

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