# Konflux Its Analyzer

> Analyze failed Konflux integration test scenario PipelineRuns using KubeArchive. Use when the user asks to analyze failed ITS pipeline runs, debug test failures, or investigate why integration tests failed in Konflux.

- **Type:** Skill
- **Install:** `agentstack add skill-aipcc-cicd-claudio-skills-konflux-its-analyzer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [aipcc-cicd](https://agentstack.voostack.com/s/aipcc-cicd)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [aipcc-cicd](https://github.com/aipcc-cicd)
- **Source:** https://github.com/aipcc-cicd/claudio-skills/tree/main/claudio-plugin/skills/konflux-its-analyzer

## Install

```sh
agentstack add skill-aipcc-cicd-claudio-skills-konflux-its-analyzer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Konflux ITS Failure Analyzer

## Overview

Analyze failed Konflux integration test scenario (ITS) PipelineRuns using KubeArchive. Retrieves archived PipelineRuns, identifies failed tasks, fetches logs, and produces root cause analysis reports.

**Namespaces:** If the user does not specify a namespace, use one of:
- `ai-tenant` — RHAIIS components
- `rhel-ai-tenant` — RHEL AI components

**Prerequisites:** `KUBECONFIG` and `KUBEARCHIVE_HOST` env vars must be set.

**IMPORTANT:**
- Do NOT run any prerequisite checks (no `command -v`, no env var checks, no install scripts). Run the scripts directly — they validate dependencies internally and print install instructions if something is missing.
- Do NOT append `2>&1` to script commands — the scripts handle their own stderr output.

## Scripts

### `get_failed_pipelineruns.sh`

Lists failed ITS PipelineRuns within a time period.

**Usage:**
```bash
${CLAUDE_SKILL_DIR}/scripts/get_failed_pipelineruns.sh   [--human]
```

**Arguments:**

| Position | Argument | Description |
|----------|----------|-------------|
| 1 | `` | Kubernetes namespace |
| 2 | `` | Time period (see formats below) |

**Time specification formats:**

| Format | Example | Description |
|--------|---------|-------------|
| Single date | `2026-04-16` | All failures on that date |
| Date range | `2026-04-14..2026-04-16` | Failures from start to end date |
| Relative hours | `4h` | Last 4 hours |
| Relative days | `2d` | Last 2 days |
| Relative weeks | `1w` | Last week |

**Options:**

| Option | Description |
|--------|-------------|
| `--human` | Table output instead of JSON |

**Examples:**
```bash
${CLAUDE_SKILL_DIR}/scripts/get_failed_pipelineruns.sh ai-tenant 2026-04-16
${CLAUDE_SKILL_DIR}/scripts/get_failed_pipelineruns.sh ai-tenant 2026-04-14..2026-04-16 --human
${CLAUDE_SKILL_DIR}/scripts/get_failed_pipelineruns.sh ai-tenant 4h
```

**Output (JSON):**
```json
[
  {
    "name": "rhaiis-test-vllm-podman-cuda-x86-64-msrt7",
    "namespace": "ai-tenant",
    "created": "2026-04-16T23:49:09Z",
    "application": "rhaiis",
    "component": "rhaiis-cuda-ubi9",
    "scenario": "rhaiis-test-vllm-podman-cuda-x86-64",
    "optional": "true",
    "event_type": "Merge Request",
    "reason": "Failed"
  }
]
```

---

### `analyze_its_failure.sh`

Deep-analyzes a single failed PipelineRun. Examines TaskRun statuses, fetches failed task logs, and produces a root cause analysis.

**Usage:**
```bash
${CLAUDE_SKILL_DIR}/scripts/analyze_its_failure.sh   [OPTIONS]
```

**Arguments:**

| Position | Argument | Description |
|----------|----------|-------------|
| 1 | `` | Kubernetes namespace |
| 2 | `` | Name of the failed PipelineRun |

**Options:**

| Option | Description |
|--------|-------------|
| `--human` | Human-readable output instead of JSON |

**Examples:**
```bash
${CLAUDE_SKILL_DIR}/scripts/analyze_its_failure.sh ai-tenant rhaiis-test-vllm-podman-neuron-x86-64-pqr7h --human
${CLAUDE_SKILL_DIR}/scripts/analyze_its_failure.sh ai-tenant rhaiis-test-vllm-podman-cuda-x86-64-msrt7
```

**Output (JSON):**
```json
{
  "pipelinerun": "rhaiis-test-vllm-podman-neuron-x86-64-pqr7h",
  "namespace": "ai-tenant",
  "status": "Failed",
  "summary": "Tasks Completed: 7 (Failed: 1, Cancelled 0), Skipped: 6",
  "event_type": "Merge Request",
  "commit_sha": "abc123...",
  "application": "rhaiis",
  "component": "rhaiis-neuron-ubi9",
  "scenario": "rhaiis-test-vllm-podman-neuron-x86-64",
  "optional": "true",
  "repo_url": "https://gitlab.com/redhat/rhel-ai/rhaiis/containers",
  "merge_request": "https://gitlab.com/redhat/rhel-ai/rhaiis/containers/-/merge_requests/351",
  "log_url": "https://konflux-ui.apps.../pipelinerun/...",
  "failed_tasks": [
    {
      "task": "test-inference",
      "step": "unnamed-0",
      "exit_code": 1
    }
  ],
  "analysis": "Human-readable root cause summary"
}
```

## Common Workflows

### Workflow 1: Find and Analyze Failures for a Date

```bash
# Step 1: List failed PipelineRuns
${CLAUDE_SKILL_DIR}/scripts/get_failed_pipelineruns.sh ai-tenant 2026-04-16 --human

# Step 2: Analyze a specific failure
${CLAUDE_SKILL_DIR}/scripts/analyze_its_failure.sh ai-tenant rhaiis-test-vllm-podman-cuda-x86-64-msrt7 --human
```

### Workflow 2: Recent Failures

```bash
# Check last 4 hours
${CLAUDE_SKILL_DIR}/scripts/get_failed_pipelineruns.sh ai-tenant 4h --human

# Check last week
${CLAUDE_SKILL_DIR}/scripts/get_failed_pipelineruns.sh ai-tenant 1w
```

## Error Handling

| Scenario | Behavior |
|----------|----------|
| PipelineRun not found | Exit 1 with error JSON |
| PipelineRun not failed | Exit 0 with status info |
| KUBECONFIG not set | Exit 1 with error |
| KUBEARCHIVE_HOST not set | Exit 1 with error |
| kubectl-ka not installed | Exit 1 with install hint |
| Logs unauthorized | Analysis notes "Logs unavailable" |
| No failed tasks found | Analysis notes "No failed tasks" |

## Dependencies

**Required:** `kubectl-ka`, `jq` — installed via `tools/*/install.sh`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [aipcc-cicd](https://github.com/aipcc-cicd)
- **Source:** [aipcc-cicd/claudio-skills](https://github.com/aipcc-cicd/claudio-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-aipcc-cicd-claudio-skills-konflux-its-analyzer
- Seller: https://agentstack.voostack.com/s/aipcc-cicd
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
