원클릭으로
lane-failure-rate
Analyze failure rates, flip-rates, and flakiness patterns for all tests in a testgrid lane.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze failure rates, flip-rates, and flakiness patterns for all tests in a testgrid lane.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Analyze the root cause inside a failed prowjob. Use when user mentions to analyze a prowjob failure or adds a prowjob url
Analyze root causes for all the recent ci-failures. Use when user mentions to analyze recent ci failures
Analyze all failed builds for a GitHub pull request. Use when user provides a GitHub PR URL and wants to understand why builds are failing.
Analyze the root cause inside a failed prowjob when a user mentions a failure or adds a prowjob URL.
Analyze root causes for all the recent CI failures (failing prowjobs that have not reached the testing stage).
Analyze all failed builds for a GitHub pull request and identify root causes.
| name | lane-failure-rate |
| description | Analyze failure rates, flip-rates, and flakiness patterns for all tests in a testgrid lane. |
| argument-hint | <testgrid-url> |
| allowed-tools | Read, Glob, Bash(go run *), Bash(gh *) |
This skill analyzes a testgrid lane and calculates failure rates for every test that has at least one failure in the requested time window. Unlike test-failure-rate (which starts from a single build's failed tests and looks them up in flakefinder), this skill operates at the lane level — it fetches all test results directly from testgrid and computes rates from raw pass/fail data.
When the user asks to analyze lanes for a Kubernetes version (e.g. "kubevirt 1.36 lanes") without providing specific testgrid URLs, use the discover-lanes subcommand to find all matching lanes across both periodic and presubmit dashboards.
$ go run ./cmd/ci-failures discover-lanes $ARGUMENTS
Example:
$ go run ./cmd/ci-failures discover-lanes $ARGUMENTS
This queries the testgrid summary API for both kubevirt-periodics and kubevirt-presubmits dashboards and produces output/tmp/discover-lanes-{version}.yaml.
version_filter: "1.36"
dashboards:
- name: kubevirt-periodics
lanes:
- tab: periodic-kubevirt-e2e-k8s-1.36-sig-compute
overall_status: FAILING
testgrid_url: "https://testgrid.k8s.io/kubevirt-periodics#periodic-kubevirt-e2e-k8s-1.36-sig-compute"
- name: kubevirt-presubmits
lanes:
- tab: pull-kubevirt-e2e-k8s-1.36-sig-compute
overall_status: FLAKY
testgrid_url: "https://testgrid.k8s.io/kubevirt-presubmits#pull-kubevirt-e2e-k8s-1.36-sig-compute"
Note: some SIG lanes only exist on one dashboard (e.g. sig-compute-serial is presubmit-only).
Presubmits often include specialized lanes beyond the standard SIG lanes — for specific architectures (e.g. sig-compute-arm64), subsets (e.g. sig-compute-windows), or serial execution (sig-compute-serial). These lanes typically do not have periodic counterparts. However, the tests they run usually also exist in the standard SIG lane of the same type (e.g. an arm64-specific test failure may also appear in the regular sig-compute periodic lane). When cross-referencing failures, check the standard SIG lane for the same test name even if the specialized lane has no periodic equivalent.
discover-lanes to find all matching laneslane-rate for each discovered lane (can run in parallel), using the testgrid_url from the discovery outputRun the lane-rate subcommand from the kubevirt.io/ci-health repository with a testgrid URL.
If not already inside the ci-health repository, cd into it first (e.g. cd kubevirt.io/ci-health from the github.com directory).
$ go run ./cmd/ci-failures lane-rate $ARGUMENTS
To control the analysis window (default 14 days):
$ go run ./cmd/ci-failures lane-rate --days 21 $ARGUMENTS
To filter out one-off failures and only keep tests at or below a success rate threshold (useful for noisy presubmit lanes):
$ go run ./cmd/ci-failures lane-rate --max-success-rate 95 $ARGUMENTS
Example:
$ go run ./cmd/ci-failures lane-rate $ARGUMENTS
This produces output/tmp/lane-rate-{tab-name}.yaml.
When analyzing presubmit lanes (which typically have many one-off test failures from individual PRs), use --max-success-rate 95 to focus on tests with meaningful failure patterns.
After data generation:
output/tmp/lane-rate-*.yaml filetestgrid_url: the original testgrid URL analyzeddashboard: the testgrid dashboard name (e.g., "kubevirt-periodics")tab: the testgrid tab/lane name (e.g., "periodic-kubevirt-e2e-k8s-1.36-sig-storage")report_days: number of days coveredreport_period_start: start of the analysis window (ISO 8601)report_period_end: end of the analysis window (ISO 8601)total_builds: number of builds in the analysis windowfailed_tests: list of tests with at least one failure, sorted by success rate ascending (worst first), each with:
test_name: full test name from testgridsucceeded: number of passing runsfailed: number of failing runs (includes flaky runs)skipped: number of skipped/not-run entriestotal_runs: succeeded + failed (excludes skipped)success_rate: percentage (0-100)severity: classification of the failure patternrecent_failures: up to 10 most recent failures, each with:
build_id: the build/column identifiertimestamp: ISO 8601 timestamp of the buildmessage: failure message from testgrid (may be empty)The severity classification above is based on aggregate success rate. Use the recent_failures data to perform richer pattern analysis that better distinguishes genuine flakes from deterministic breakage and infrastructure events.
Examine the recent_failures list to detect state transitions (pass→fail→pass patterns):
recent_failures timestamps are consecutive builds, the test has a real bug regardless of what the aggregate success rate saysA test with 75% success rate could be either: flaky (alternating pass/fail across 40 runs) or broken-then-fixed (failed 10 runs in a row then passed 30). The flip rate distinguishes the two — same success rate, completely different diagnosis.
Examine the timestamps in recent_failures:
Compare recent_failures timestamps across different tests in the results:
build_ids), they failed together in the same build — this is an infrastructure flake signal, not individual test problems[QUARANTINE] are already known flakes; note this when presenting[QUARANTINE] in the name and one without — each covering only the portion of the window where that variant was active. Treat these as a single test: combine their failure counts mentally, and note the transition (e.g. "quarantined mid-window, 0/45 before + 0/6 after"). A high skip count on one variant and low skip count on the other is the telltale sign of a mid-window quarantine change.After per-test details, provide a summary:
| Test | Rate | Runs | Pattern | Assessment |
|---|
Where Pattern is one of:
After presenting the analysis and top priorities, check GitHub for existing tracker issues and offer to create missing ones.
For each top-priority test failure, search the upstream repository (typically kubevirt/kubevirt) for open issues that reference the test name or a distinctive keyword from the error message:
gh issue list -R kubevirt/kubevirt --state open --search "virtiofs ServiceAccount token" --limit 5
Use a short, distinctive substring of the test name — not the full name, which is too long for search. Try the most specific part (e.g. virtiofs ServiceAccount, should pause VMI on IO error, volume migrate block to filesystem). If no results, try the error signature (e.g. expired after 200 seconds config.go:173).
For each top-priority item, report whether a tracking issue exists:
After the search results, offer to create GitHub issues for any top-priority failures that lack a tracker. Do not create issues automatically — ask the user first. When creating, include:
Some lanes — typically unit test lanes on non-Bazel architectures (e.g. s390x) — do not produce JUnit XML artifacts. When this happens, testgrid only has two entries:
{lane-name}.Overall
{lane-name}.Pod
After running lane-rate, check whether the failed_tests list contains only entries ending in .Overall or .Pod (or is empty despite the lane having a non-zero failure rate in testgrid). If so, the lane is opaque — all failures are collapsed into a single .Pod entry, and per-test analysis is meaningless.
analyze-build skill on individual failing builds to identify specific test failures from the raw build log.KubeVirtTestSuiteSetup function (staging/src/kubevirt.io/client-go/testutils/setup.go) that already supports JUnit XML via v1reporter.NewV1JUnitReporter, but the reporter is only activated under Bazel environment variables (GO_TEST_WRAP, XML_OUTPUT_FILE). Non-Bazel test paths (like make go-test used by s390x) skip JUnit output because these env vars are absent. The fix is to enable the Ginkgo JUnit reporter when the ARTIFACTS env var is set (which Prow provides).The lane-rate command gives a lane-wide overview, while test-failure-rate gives a cross-lane view for specific tests. Use lane-rate to find which tests are problematic in a lane, then use test-failure-rate on a specific build to see if those tests also fail in other lanes.