Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"name": "ci",
"source": "./plugins/ci",
"description": "A plugin to work with OpenShift CI and analyze Prow job results",
"version": "0.0.16"
"version": "0.0.17"
},
{
"name": "teams",
Expand Down
2 changes: 1 addition & 1 deletion docs/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
"name": "Triage Regression"
}
],
"version": "0.0.16"
"version": "0.0.17"
},
{
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/ci/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ci",
"description": "Tools for working with OpenShift CI and analyzing Prow job results",
"version": "0.0.16",
"version": "0.0.17",
"author": {
"name": "openshift"
}
Expand Down
13 changes: 12 additions & 1 deletion plugins/ci/skills/analyze-payload/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ Instruct each subagent as follows:
> Analyze the failure at <prow_url>. First, check the JUnit results or build log to determine whether this is an install failure (look for `install should succeed: overall` or similar install-related test failures) or a test failure (install passed, specific tests failed).
>
> Based on the failure type, use the appropriate skill:
> - **Install failure**: Use the `ci:prow-job-analyze-install-failure` skill. For metal/bare-metal jobs (job name contains "metal"), perform additional analysis using the `ci:prow-job-analyze-metal-install-failure` skill as needed for dev-scripts, Metal3/Ironic, and BareMetalHost-specific diagnostics.
> - **Install failure**: Use the `ci:prow-job-analyze-install-failure` skill. **You MUST download and examine the actual installer log bundle** — do NOT skip this step or make assessments based only on high-level metadata like pass rates or job names. The log bundle contains the actual error messages that reveal the root cause. For metal/bare-metal jobs (job name contains "metal"), perform additional analysis using the `ci:prow-job-analyze-metal-install-failure` skill as needed for dev-scripts, Metal3/Ironic, and BareMetalHost-specific diagnostics.
> - **Test failure**: Use the `ci:prow-job-analyze-test-failure` skill.
>
> **IMPORTANT — Classify failures based on log evidence, not assumptions.** You must examine the actual logs (installer log, log bundle, bootstrap journals, kube-apiserver logs) before classifying a failure. A bootstrap timeout could be infrastructure, a product bug, or a race condition — the logs will tell you which. Cite specific error messages in your assessment.
>
Comment thread
stbenjam marked this conversation as resolved.
Resolved
> Return a concise summary including: failure type (install vs test), root cause, key error messages, and any relevant log excerpts. Do not ask user questions. Keep the output concise for inclusion in a summary report.
>
> If the job is an aggregated job (has `aggregated-` prefix in the name or an `aggregator` container/step), also return the **underlying job name** (e.g., `periodic-ci-openshift-release-main-ci-4.22-e2e-aws-upgrade-ovn-single-node`). This is found in the junit-aggregated.xml artifacts — each `<testcase>` has `<system-out>` YAML data with a `humanurl` field linking to individual runs whose URL path contains the underlying job name. The underlying job name cannot be derived from the aggregated job name — it must be extracted from the artifacts.
Expand All @@ -132,6 +134,15 @@ This structured format enables downstream consumers (like the `payload-agent` sk

**Important**: Launch ALL subagents in parallel (single message with multiple Task tool calls) for maximum speed. Each subagent should be given `subagent_type: "general-purpose"`. Do NOT set the `model` parameter — let subagents inherit the parent model, as these analysis tasks require a capable model.

#### Cross-Platform and Cross-Job Failure Pattern Recognition

After collecting subagent results, look for patterns across multiple jobs:

- **Same failure across a job family** (e.g., all `techpreview` jobs, all `fips` jobs, all `upgrade` jobs): This often indicates a failure specific to that feature set or configuration. Look at what differentiates that job family (feature gates, install-config options, test parameters).
- **Same failure across multiple platforms**: Consider whether this points to a product bug in shared code, though note that cross-platform infrastructure issues (e.g., CI platform problems) are also possible.

When patterns emerge, query Sippy for pass rates of related non-blocking jobs to see if the pattern extends beyond blocking jobs.

### Step 6: Collect Investigation Results and Identify Revert Candidates

Wait for all subagents to complete and collect their analysis results. For each failed job, you should now have:
Expand Down
4 changes: 4 additions & 0 deletions plugins/ci/skills/payload-agent/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ Execute the `analyze-payload` skill Steps 1-6 to gather all analysis data:
6. Identify revert candidates (Step 6.2)
7. Check for existing reverts (Step 6.3)

**Critical — Install failure investigation must be thorough.** When subagents investigate install failures (Step 5), they MUST use the `ci:prow-job-analyze-install-failure` skill to download and examine actual log bundles. Do not allow surface-level assessments based on pass rates or job names alone. Bootstrap timeouts, for example, can be caused by admission plugin bugs, race conditions, or configuration errors — not just infrastructure problems. The log bundle contains the actual error messages that reveal root cause.

**Critical — Evaluate ALL new PRs as potential causes.** When failures affect a specific feature set (e.g., TechPreview), examine each new PR for changes that could affect that feature set: feature gate changes, vendored dependency updates (especially kube rebases), manifest changes that add/modify annotations, and admission plugin configuration. Vendor-only rebases can still introduce behavioral changes through updated library code.

All results stay in-context (not written to files yet). The `analyze-payload` skill's Steps 7-9 (report generation) are deferred to Step 6 of this skill.

### Step 3: Apply Confidence Scoring
Expand Down
20 changes: 12 additions & 8 deletions plugins/ci/skills/prow-job-analyze-install-failure/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,49 +612,53 @@ See that skill's documentation for details on dev-scripts, libvirt logs, sosrepo

## Important Notes

1. **Eventual Consistency Behavior**
1. **Bootstrap Failures Require Log Bundle Analysis**
- Bootstrap timeout failures can have many causes — always download and examine the installer log bundle to determine the actual root cause
- Do not classify bootstrap failures without examining the logs

2. **Eventual Consistency Behavior**
- OpenShift installations exhibit eventual consistency
- Components report errors while waiting for dependencies
- Early errors are EXPECTED and usually resolve automatically
- **Always analyze backwards from the final timeout, not forwards from the start**
- Only errors that persist until failure are relevant root causes

2. **Upgrade Jobs and Installation**
3. **Upgrade Jobs and Installation**
- Jobs with "upgrade" in the name perform installation FIRST, then upgrade
- If you're analyzing an installation failure in an upgrade job, it never got to the upgrade phase
- "minor" upgrade: Installs 4.n-1 version (e.g., 4.20 for a 4.21 upgrade job)
- "micro" upgrade: Installs earlier payload in same stream

3. **Log Bundle Availability**
4. **Log Bundle Availability**
- Not all jobs produce log bundles
- Older jobs may not have this feature
- Installation must reach a certain point to generate log bundle

4. **Must-Gather Availability**
5. **Must-Gather Availability**
- Must-gather only exists if a `must-gather*.tar` file is present
- If no .tar file exists, the cluster was too unstable to collect diagnostics
- **Never suggest downloading must-gather unless you verified the .tar file exists**

5. **Metal Job Specifics**
6. **Metal Job Specifics**
- Metal jobs are analyzed using the specialized `prow-job-analyze-metal-install-failure` skill
- That skill handles dev-scripts, libvirt console logs, sosreport, and squid logs
- See the metal skill documentation for details

6. **Debugging Workflow**
7. **Debugging Workflow**
- Start with installer log to find **LAST** error (not first)
- Use failure stage to guide which logs to examine
- Log bundle provides node-level details
- For metal jobs, invoke the metal-specific skill for additional analysis
- Work backwards in time to trace dependency chains

7. **Common Failure Patterns**
8. **Common Failure Patterns**
- **Bootstrap etcd not starting**: Check etcd.log and bootkube.log
- **API server not responding**: Check kube-apiserver.log
- **Masters not joining**: Check master serial logs
- **Operators degraded**: Check specific operator logs in must-gather (if it exists)
- **Network issues**: Check network configuration in bootstrap/network/

8. **File Formats**
9. **File Formats**
- Installer log: Plain text, structured format
- Journal logs: systemd journal format (plain text export)
- Serial logs: Raw console output
Expand Down