원클릭으로
analyze-ci-failures
Analyze root causes for all the recent ci-failures. Use when user mentions to analyze recent ci failures
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze root causes for all the recent ci-failures. Use when user mentions to analyze recent ci failures
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 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.
Unified flake analysis combining PR-based flakefinder data with periodic lane failure rates. Use when the user wants an overview of test flakiness across the project.
| name | analyze-ci-failures |
| description | Analyze root causes for all the recent ci-failures. Use when user mentions to analyze recent ci failures |
| allowed-tools | ["Read","Write","Grep","Bash(go run:*)","Bash(stat:*)","Bash(ls:*)","Bash(git fetch:*)","Bash(git diff:*)"] |
This skill helps the user to find the root cause and mitigations for all ci failures aka failing prowjobs that have not reached the testing stage.
As a base for analyzing the failure, the go tool cmd/ci-failures from the kubevirt.io/ci-health repository is to be used. As a base for the data the file
output/kubevirt/kubevirt/results.json is used.
If not already inside the ci-health repository, cd into it first (e.g. cd kubevirt.io/ci-health from the github.com directory).
Example how to generate the data files for the prowjobs failing ci:
$ go run ./cmd/ci-failures generate yaml
This produces:
output/tmp/errors-{sig}/*.yaml — per-job error extractions with snippets, line links, and contextoutput/tmp/build-logs/{buildID}.yaml — full cached build logs with prow URL, GCS URL, timestamps, and complete log contentAt the end of execution, the command prints a YAML list of all generated error files to stdout:
generated_files:
- output/tmp/errors-sig-compute/pull-kubevirt-e2e-k8s-1.35-sig-compute.yaml
- output/tmp/errors-sig-network/pull-kubevirt-e2e-k8s-1.35-sig-network.yaml
...
Parse this list to know exactly which files to read — no separate file discovery step (find/glob) is needed.
Before you proceed,
output/kubevirt/kubevirt/results.json available on the main branch - in that case first update the current branch with latest changes by rebasing on main.output/tmp file time stamps with output/kubevirt/kubevirt/results.json - if the files in output/tmp are older than the latter, they are stale and need to get deleted.To compare timestamps, use ls -lt to list both files together — the newer file appears first:
$ ls -lt output/kubevirt/kubevirt/results.json output/tmp/errors-*/*.yaml
If results.json appears above (newer than) the error YAML files, the generated data is stale.
To delete stale data, remove the entire output/tmp directory:
$ rm -rf output/tmp/*
output/tmp/errors-{sig}/*.yaml)Each file contains structured data — most metadata can be read directly without parsing URLs:
errors-sig-compute/, errors-sig-network/, errors-sig-storage/, errors-sig-monitoring/, errors-sig-performance/)job_name field): the Prow job name, e.g., pull-kubevirt-e2e-k8s-1.35-sig-networkjob_name — if it ends with a version suffix like -1.6, it targets release-1.6; no suffix means mainjob_name — the k8s-X.Y or kind-X.Y segment gives the K8s version (e.g., 1.35)job_url — the segment after pull/kubevirt_kubevirt/ (e.g., 17129)build_errors list), each containing:
job_url: direct link to the Prow job UIbuild_id: the Prow build number (also usable to find the full build log)started / finished: timestampsresult: the Prow build result from finished.json — one of SUCCESS, FAILURE, ABORTED, ERRORpassed: boolean from finished.jsoncategory: error category — one of external, internal, pr-build, needs-investigation, prow-aborted, prow-errorcategory_reason: explanation of the categorizationcategory: prow-aborted were killed by Prow (e.g., superseded by a newer commit) — exclude these from failure counts and cross-PR analysis. Builds with category: prow-error failed to schedule — also exclude.build_log_error_snippets: list of extracted error matches, each with:
error_text: the matched error linecontext: surrounding lines (typically 3 before and after) — this is the primary source for root cause analysislink_to_log_line: direct link to the error line in Prow UIstart_line, error_line, end_line: line numbers in the build logoutput/tmp/build-logs/{buildID}.yaml)Only needed when error snippets are insufficient for root cause analysis. Use the show-log command to read decoded build logs instead of reading the YAML files directly (they contain base64-encoded binary content):
# Show last 30 lines of a build log
$ go run ./cmd/ci-failures show-log <build-id> --tail 30
# Search for error patterns (case-insensitive)
$ go run ./cmd/ci-failures show-log <build-id> --grep "error" --tail 20
Flags:
--tail N — print only the last N lines (default: all)--grep pattern — filter lines containing the pattern (case-insensitive); output includes line numbersgenerated_files: YAML list printed by the generate yaml command to get all error YAML file paths — no separate discovery step needederror_text and context fields to determine root cause. In most cases the snippets contain enough informationgo run ./cmd/ci-failures show-log <build_id> --grep "error" --tail 20 to search the full build logAfter grouping failures by root cause, apply these additional analyses:
When the same test fails across multiple different PRs in the data, it is almost certainly a systemic flake, not caused by any individual PR. To identify these:
job_url)When many errors from the same time window share infrastructure signatures, group them as a single infra event rather than analyzing each individually:
started/finished timestamps across build errors from different jobsErrImagePull, ImagePullBackOff) — registry or network issuecontext deadline exceeded in cluster setup — provisioning infra overloadedWhen presenting results, prioritize by actionability:
The output is to be looked at as described above, then reasons and possible mitigations are to be deduced.
After the CI failure summary, suggest follow-up analyses when appropriate: