Skip to content

add skip tag for broken evals - #714

Merged
aantn merged 4 commits into
masterfrom
add-skip-tag
Jul 25, 2025
Merged

aantn merged 4 commits into
masterfrom
add-skip-tag

Conversation

@aantn

@aantn aantn commented Jul 25, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 25, 2025 •

Copy link
Copy Markdown
Contributor

"""

Walkthrough

The changes introduce a new pytest marker "skip" for broken or non-reproducible tests, update the GitHub Actions workflow to exclude tests marked with "skip" during LLM evaluation runs, add the "skip" tag with explanatory comments to specific test cases, and update Kubernetes job metadata and related test prompts in a fixture.

Changes

File(s) Change Summary
.github/workflows/llm-evaluation.yaml Modified pytest command to exclude tests marked with "skip" using -m 'not skip'.
pyproject.toml Added "skip" marker to pytest markers list for broken or non-reproducible tests.
tests/llm/fixtures/test_ask_holmes/47_truncated_logs_context_window/test_case.yaml Added "skip" tag with a comment explaining the evaluator does not see evidence supporting the expected issue.
tests/llm/fixtures/test_ask_holmes/46_job_crashing_no_longer_exists/manifest.yaml Updated Kubernetes Job metadata: changed job name, namespace, and container name; container image and commands unchanged.
tests/llm/fixtures/test_ask_holmes/46_job_crashing_no_longer_exists/test_case.yaml Updated test prompt and namespace commands to match new job metadata; added "skip" tag with comment about external logs.
tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/test_case.yaml Added "easy" tag to test case metadata.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes
"""

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 add-skip-tag

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.

@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 (1)
pyproject.toml (1)

88-111: Remove duplicated markers to avoid confusion and future merge-noise

"missing-tool" and "kafka" appear twice (lines 98 & 109, 97 & 110). Keeping duplicates clutters the config and can cause hard-to-spot merge conflicts later.

-    "missing-tool: Verify holmes knows how to communicate this to the user",
-    "kafka: Tests involving Kafka functionality",
     "skip: Broken or non-reproducible tests"

(A single definition of each existing marker already appears a few lines above.)

🧹 Nitpick comments (1)
.github/workflows/llm-evaluation.yaml (1)

48-48: Quote the marker expression to prevent shell-level globbing

In bash, single quotes already protect the expression, but double-quoting avoids accidental glob expansion by the shell before pytest receives it (e.g., if someone replaces skip with a pattern containing *).

-  poetry run pytest --no-cov tests/llm/test_ask_holmes.py tests/llm/test_investigate.py -m 'not skip' -n 6
+  poetry run pytest --no-cov tests/llm/test_ask_holmes.py tests/llm/test_investigate.py -m "not skip" -n 6
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 47dc196 and 9429738.

📒 Files selected for processing (3)
  • .github/workflows/llm-evaluation.yaml (1 hunks)
  • pyproject.toml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/47_truncated_logs_context_window/test_case.yaml (1 hunks)
⏰ 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 (1)
tests/llm/fixtures/test_ask_holmes/47_truncated_logs_context_window/test_case.yaml (1)

5-5: LGTM – clear skip rationale

The added skip tag with an inline comment documents the reason succinctly and keeps the flaky eval out of CI.

@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 (1)
tests/llm/fixtures/test_ask_holmes/46_job_crashing_no_longer_exists/test_case.yaml (1)

12-16: Replace arbitrary sleeps with deterministic waits

The sleep 60 / sleep 20 blocks make the fixture slow and still nondeterministic on busy clusters. Consider waiting for the resource to reach the desired state instead:

-  sleep 60
+  kubectl wait --for=condition=complete --timeout=90s job/typescript-transpiler -n ts-46 || true
...
-  sleep 20
+  kubectl wait --for=delete job/typescript-transpiler -n ts-46 --timeout=60s || true

This shortens runtime and avoids brittle timing assumptions.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between eb9c9ba and 32dd914.

📒 Files selected for processing (3)
  • tests/llm/fixtures/test_ask_holmes/46_job_crashing_no_longer_exists/manifest.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/46_job_crashing_no_longer_exists/test_case.yaml (1 hunks)
  • tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/test_case.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • tests/llm/fixtures/test_ask_holmes/63_fetch_error_logs_no_errors/test_case.yaml
  • tests/llm/fixtures/test_ask_holmes/46_job_crashing_no_longer_exists/manifest.yaml
⏰ 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 (2)
tests/llm/fixtures/test_ask_holmes/46_job_crashing_no_longer_exists/test_case.yaml (2)

5-8: 👍 Good use of the new skip tag

Adding the explanatory comments followed by the skip marker cleanly disables the flaky eval while documenting the rationale. No action needed.


1-1: No action needed – prompt and manifest identifiers are consistent

Verified that tests/llm/fixtures/test_ask_holmes/46_job_crashing_no_longer_exists/manifest.yaml contains:

  • name: typescript-transpiler
  • namespace: ts-46

The user prompt already matches these identifiers.

@aantn
aantn enabled auto-merge (squash) July 25, 2025 14:03
@github-actions

Copy link
Copy Markdown
Contributor

Results of HolmesGPT evals

  • ask_holmes: 46/70 test cases were successful, 0 regressions, 18 mock failures
  • investigate: 13/16 test cases were successful, 1 regressions, 1 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 06_explain_issue ✅
ask 07_high_latency ✅
ask 08_sock_shop_frontend ⚠️
ask 09_crashpod ✅
ask 10_image_pull_backoff 🔧
ask 11_init_containers ✅
ask 12_job_crashing ✅
ask 13_pending_node_selector ✅
ask 14_pending_resources ✅
ask 15_failed_readiness_probe ✅
ask 16_failed_no_toolset_found ✅
ask 17_oom_kill ✅
ask 18_crash_looping_v2 ✅
ask 19_detect_missing_app_details 🔧
ask 20_long_log_file_search ✅
ask 21_job_fail_curl_no_svc_account ⚠️
ask 22_high_latency_dbi_down 🔧
ask 23_app_error_in_current_logs 🔧
ask 24_misconfigured_pvc ✅
ask 25_misconfigured_ingress_class 🔧
ask 26_multi_container_logs ✅
ask 27_permissions_error_no_helm_tools ✅
ask 28_permissions_error_helm_tools_enabled 🔧
ask 29_events_from_alert_manager ✅
ask 30_basic_promql_graph_cluster_memory ✅
ask 31_basic_promql_graph_pod_memory 🔧
ask 32_basic_promql_graph_pod_cpu ✅
ask 33_http_latency_graph 🔧
ask 34_memory_graph ✅
ask 35_tempo ✅
ask 36_argocd_find_resource 🔧
ask 37_argocd_wrong_namespace ✅
ask 38_rabbitmq_split_head ✅
ask 39_failed_toolset ✅
ask 40_disabled_toolset ✅
ask 41_setup_argo ✅
ask 42_dns_issues_result_all_tools 🔧
ask 42_dns_issues_result_new_tools 🔧
ask 42_dns_issues_result_new_tools_no_runbook 🔧
ask 42_dns_issues_result_old_tools 🔧
ask 42_dns_issues_steps_new_all_tools 🔧
ask 42_dns_issues_steps_new_tools 🔧
ask 42_dns_issues_steps_old_tools 🔧
ask 43_current_datetime_from_prompt ✅
ask 43_slack_deployment_logs 🔧
ask 44_slack_statefulset_logs 🔧
ask 45_fetch_deployment_logs_simple ✅
ask 48_logs_since_thursday 🔧
ask 49_logs_since_last_week 🔧
ask 50_logs_since_specific_date 🔧
ask 51_logs_summarize_errors ✅
ask 52_logs_login_issues ⚠️
ask 53_logs_find_term ✅
ask 54_not_truncated_when_getting_pods ✅
ask 55_kafka_runbook 🔧
ask 56_kafka_runbook_no_tool ✅
ask 57_wrong_namespace ⚠️
ask 58_counting_pods_by_status ⚠️
ask 59_label_based_counting ✅
ask 60_time_based_filtering 🔧
ask 61_exact_match_counting ✅
ask 62_fetch_error_logs_with_errors ✅
ask 63_fetch_error_logs_no_errors ✅
ask 64_keda_vs_hpa_confusion ⚠️
ask 65_health_check_followup 🔧
investigate 01_oom_kill 🔧
investigate 02_crashloop_backoff 🔧
investigate 03_cpu_throttling ✅
investigate 04_image_pull_backoff 🔧
investigate 05_crashpod ✅
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 🔧
investigate 15_dns_resolution ⚠️
investigate 16_dns_resolution_no_tool 🔧

Legend

  • ✅ the test was successful
  • ⚠️ 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

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