Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

fetch-test-runs

БесплатноЗапускает вложенные скриптыНе проверен

Fetch test runs from Sippy API including outputs for AI-based similarity analysis

openshift-engот openshift-eng★ 123 звезды на GitHub

Об этом скилле

Fetch Test Runs

This skill fetches test runs from the Sippy API. It can return both failed and successful test runs, including JUnit output for AI-based analysis.

When to Use This Skill

Use this skill when you need to:

  • Fetch test run data for a specific test across all jobs
  • Get raw test failure outputs for AI-based similarity analysis
  • Compare error messages across runs to determine if they share the same root cause
  • Include successful runs in addition to failures (optional)
  • Filter runs by job name substrings (e.g., only GCP techpreview jobs)
  • Access JUnit test output for debugging and investigation

Prerequisites

  1. Network Access: Must be able to reach the Sippy test runs API

    • No authentication required
    • Check: curl -s https://sippy.dptools.openshift.org/api/tests/v2/runs?test_id=test
  2. Python 3: Python 3.6 or later

    • Check: python3 --version
    • Uses only standard library (no external dependencies)
  3. Input Data: Requires test_id (job_run_ids are optional)

    • Get from fetch-regression-details skill output
    • test_id: Found in regression data (e.g., "openshift-tests:71c053c318c11cfc47717b9cf711c326")
    • job_run_ids: Optional - extracted from sample_failed_jobs[].failed_runs[].job_run_id

Implementation Steps

Step 1: Run the Python Script

# Path to the Python script
script_path="plugins/ci/skills/fetch-test-runs/fetch_test_runs.py"

# Fetch all test runs (failures only, by default)
python3 "$script_path" "$test_id" --format json

# Include successful runs as well
python3 "$script_path" "$test_id" --include-success --format json

# Filter to a specific Prow job (exact name works as substring of itself)
python3 "$script_path" "$test_id" --job-contains "periodic-ci-openshift-release-..." --format json

# Filter by multiple substrings (AND logic, case-insensitive, server-side)
python3 "$script_path" "$test_id" --job-contains gcp --job-contains techpreview --format json

# Filter to specific job run IDs (backward compatible with analyze-regression)
python3 "$script_path" "$test_id" "$job_run_ids" --format json

# Get human-readable summary
python3 "$script_path" "$test_id" --format summary

Arguments:

  • test_id: Required test identifier (e.g., "openshift-tests:abc123")
  • job_run_ids: Optional comma-separated list of Prow job run IDs to filter by

Options:

  • --include-success: Include successful test runs (default: failures only)
  • --job-contains <name>: Filter by job name substring (server-side, case-insensitive). Repeatable for AND logic — all substrings must appear in the job name. Full job names also work since they are substrings of themselves. E.g., --job-contains gcp --job-contains techpreview matches jobs containing both "gcp" and "techpreview".
  • --start-days-ago <days>: Number of days to look back (default API is 7 days)
  • --exclude-output: Strip the output field from each run to reduce response size. Use when you only need pass/fail status (e.g., regression start analysis). Significantly reduces JSON output size for large result sets.
  • --output <path>: Write output to a file instead of stdout. Use when fetching large result sets (e.g., --include-success --start-days-ago 28) that may exceed stdout buffer limits. The script prints a summary line to stderr confirming the write.
  • --format json|summary: Output format (default: json)

Step 2: Prepare Input Data (for analyze-regression)

When used with regression analysis, extract required data from regression details:

# Assuming you have regression_data from fetch-regression-details skill
test_id=$(echo "$regression_data" | jq -r '.test_id')

# Collect all job_run_ids from sample_failed_jobs
# This creates a comma-separated list of all failed job run IDs
job_run_ids=$(echo "$regression_data" | jq -r '
  .sample_failed_jobs
  | to_entries[]
  | .value.failed_runs[]
  | .job_run_id
' | tr '\n' ',' | sed 's/,$//')

echo "Test ID: $test_id"
echo "Job Run IDs: $job_run_ids"

Step 3: Parse the Output

The script outputs structured JSON data:

# Store JSON output for processing
output_data=$(python3 "$script_path" "$test_id" --format json)

# Check if fetch was successful
success=$(echo "$output_data" | jq -r '.success')

if [ "$success" = "true" ]; then
  # Extract runs array
  runs=$(echo "$output_data" | jq -r '.runs')

  # The runs array contains objects with: url, output, test_name, success
  # The AI command will analyze these runs for similarity
  echo "Fetched $(echo "$runs" | jq 'length') runs"
else
  # Handle error case
  error=$(echo "$output_data" | jq -r '.error')
  echo "Error: $error"
  echo "Test runs API may not be available"
fi

API Response Schema

The Sippy API returns a JSON array of test run objects:

[
  {
    "url": "https://prow.ci.openshift.org/view/gs/test-platform-results-public/logs/periodic-ci-openshift-release-master-ci-4.22-e2e-aws-ovn-techpreview/2016123858595090432",
Полный SKILL.md на GitHub

Установить fetch-test-runs в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdfetch_test_runs.py

FAQ

Что делает скилл fetch-test-runs?

Fetch test runs from Sippy API including outputs for AI-based similarity analysis

Как установить скилл fetch-test-runs?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл fetch-test-runs запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить fetch-test-runs с