Skip to content

CI Plugin Regression Analysis Improvements - #377

Merged
openshift-merge-bot[bot] merged 9 commits into
openshift-eng:mainfrom
dgoodwin:ci-plugin-4
Mar 16, 2026
Merged

openshift-merge-bot[bot] merged 9 commits into
openshift-eng:mainfrom
dgoodwin:ci-plugin-4

Conversation

@dgoodwin

@dgoodwin dgoodwin commented Mar 16, 2026

Copy link
Copy Markdown
Contributor
  • Minor tweaks for CI plugin
  • Document the mass failure test and how it's used
  • Add new skill to fetch job run summaries from sippy
  • Use the new fetch job runs skill in analyze-regression command
  • Reduce pointless user prompts to run skills with python scripts
  • Improve test name inclusion in jira bug reports
  • Make update

Summary by CodeRabbit

  • New Features

    • Added "Fetch Job Run Summary" command to retrieve and summarize Prow job run results, highlighting dominant error patterns and failed tests.
  • Bug Fixes

    • Fixed encoding for URL query parameters to handle special characters in test identifiers.
  • Documentation

    • Expanded regression analysis guidance to include job-run context and UI link handling.
    • Added full documentation for the new job-run summary capability and mass-failure testing guidance.
  • Chores

    • Bumped plugin version to 0.0.29.

@openshift-ci
openshift-ci Bot requested review from cblecker and rvanderp3 March 16, 2026 13:25
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2026
@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request adds a new "Fetch Job Run Summary" skill to the CI plugin (with docs and CLI), bumps plugin version to 0.0.29, integrates the skill into regression analysis docs, and tweaks test-run fetching URL encoding.

Changes

Cohort / File(s) Summary
Version & Marketplace
.claude-plugin/marketplace.json, plugins/ci/.claude-plugin/plugin.json
Bump CI plugin version from 0.0.280.0.29.
Command Registry / Docs Index
docs/data.json
Register new command fetch-job-run-summary for the ci plugin; update plugin version.
New Skill — Implementation
plugins/ci/skills/fetch-job-run-summary/fetch_job_run_summary.py
Add new Python CLI JobRunSummaryFetcher to call Sippy API, extract/normalize error patterns, compute pass rates and dominant errors, and output text or JSON.
New Skill — Documentation
plugins/ci/skills/fetch-job-run-summary/SKILL.md
Add skill documentation with usage, parameters, API details, examples, and output formats.
Regression Analysis Guidance
plugins/ci/commands/analyze-regression.md
Integrate job-run context (Section 7a / 4a) using the new skill; require full test names, UI URLs, and update triage/reporting templates and guidance.
Tests Documentation
plugins/ci/docs/tests.md
Add "Mass Test Failure (Test Framework) Tests" subsection describing a synthetic failure when >10 tests fail in a run.
Existing Skill Fix
plugins/ci/skills/fetch-test-runs/fetch_test_runs.py
Encode test_id in API requests with urllib.parse.quote to properly escape special characters.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant CI_Plugin as "CI Plugin (skill)"
    participant Sippy as "Sippy API"
    participant AI as "Analysis/Reporter"

    User->>CI_Plugin: request fetch-job-run-summary(prow_job_run_id, format)
    CI_Plugin->>Sippy: GET /api/job/run/summary?prow_job_run_id=...
    Sippy-->>CI_Plugin: JSON job run data
    CI_Plugin->>CI_Plugin: extract_error_pattern(), compute pass rate, dominant errors
    CI_Plugin-->>User: formatted text|JSON summary
    CI_Plugin->>AI: (optional) provide structured JSON for regression analysis/report
    AI-->>User: integrated regression context (reports/triage)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 7 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'CI Plugin Regression Analysis Improvements' clearly summarizes the main objective of the PR, which focuses on enhancing regression analysis capabilities through documentation, new skills, and command updates.
No Real People Names In Style References ✅ Passed No references to real people by name used as style references found in modified documentation files.
No Assumed Git Remote Names ✅ Passed The PR does not contain hardcoded git remote names like 'origin' or 'upstream'. Changes focus on a Prow job run summary skill and regression analysis documentation without git operations.
Git Push Safety Rules ✅ Passed Pull request contains no git push commands, force push operations, or autonomous push workflows. All new code and configuration files are safely updated without dangerous git operations.
No Untrusted Mcp Servers ✅ Passed After thorough examination of all modified files, no MCP server installations from untrusted sources are being introduced. The PR adds a Python skill and documentation updates with only standard library dependencies.
Ai-Helpers Overlap Detection ✅ Passed New skill fetch-job-run-summary fetches job-level aggregated data from Sippy API, functionally distinct from existing fetch-test-runs skill which fetches individual test details from different source. No overlapping functionality detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@dgoodwin dgoodwin changed the title ci plugin 4 CI Plugin Regression Analysis Improvements Mar 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
plugins/ci/skills/fetch-job-run-summary/SKILL.md (1)

48-50: Add language identifier to fenced code block.

The code block showing the URL pattern should have a language identifier for consistent formatting.

📝 Suggested fix
-```
+```text
 https://prow.ci.openshift.org/view/gs/test-platform-results/logs/<job-name>/<job_run_id>
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @plugins/ci/skills/fetch-job-run-summary/SKILL.md around lines 48 - 50,
Update the fenced code block in SKILL.md that shows the Prow URL pattern so it
includes a language identifier; change the opening fence from totext so
the block reads as a plain-text snippet (the URL example near the Prow pattern
https://prow.ci.openshift.org/view/gs/test-platform-results/logs//<job_run_id>).


</details>

</blockquote></details>
<details>
<summary>plugins/ci/skills/fetch-job-run-summary/fetch_job_run_summary.py (1)</summary><blockquote>

`94-99`: **Unused loop variable `test_name`.**

The loop variable `test_name` is not used within the loop body. Use `_` to indicate an intentionally unused variable.

<details>
<summary>🔧 Suggested fix</summary>

```diff
-        for test_name, error_msg in test_failures.items():
+        for _, error_msg in test_failures.items():
             pattern = self.extract_error_pattern(error_msg)
             error_patterns[pattern] += 1
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against the current code and only fix it if needed.

In `@plugins/ci/skills/fetch-job-run-summary/fetch_job_run_summary.py` around
lines 94 - 99, The loop in which you build error_patterns unnecessarily declares
test_name but never uses it; change the iteration over test_failures to use an
unused variable name (e.g., replace "for test_name, error_msg in
test_failures.items()" with "for _, error_msg in test_failures.items()") so the
intent is clear and linters won't flag the unused variable; this affects the
block that calls self.extract_error_pattern(error_msg) and updates
error_patterns.
```

</details>

</blockquote></details>
<details>
<summary>plugins/ci/commands/analyze-regression.md (2)</summary><blockquote>

`692-697`: **Add language identifier to fenced code block.**

The code block should have a language identifier for consistent formatting, even for Jira markup.

<details>
<summary>📝 Suggested fix</summary>

```diff
-       ```
+       ```text
        {code}
        [Jira:"Test Framework"] there should not be mass test failures
        {code}
        ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @plugins/ci/commands/analyze-regression.md around lines 692 - 697, Update the
fenced code block that wraps the Jira {code} example so it includes a language
identifier; locate the triple-backtick block containing the lines "{code}",
"[Jira:"Test Framework"] there should not be mass test failures", and the
closing "{code}" and change the opening fence from totext (and keep the
closing fence unchanged) so the snippet is explicitly marked as text for
consistent formatting.


</details>

---

`939-944`: **Add language identifier to fenced code block.**

Same as above — add a language identifier for consistency.

<details>
<summary>📝 Suggested fix</summary>

```diff
-     ```
+     ```text
      {code}
      [Monitor:kubelet-container-restarts][sig-architecture] platform pods in ns/openshift-kube-apiserver should not exit an excessive amount of times
      {code}
      ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @plugins/ci/commands/analyze-regression.md around lines 939 - 944, Update the
fenced code block that contains the Jira {code} wrapper and the test name line
"[Monitor:kubelet-container-restarts][sig-architecture] platform pods in
ns/openshift-kube-apiserver should not exit an excessive amount of times" to
include a language identifier by changing the opening triple-backticks to
"text" so the block becomes text, then the {code} block and test name, and
close with ```; ensure the single-line test name remains unchanged inside the
{code} wrapper.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Inline comments:
In @plugins/ci/skills/fetch-job-run-summary/SKILL.md:

  • Around line 99-118: The documentation JSON example is inconsistent with the
    implementation in fetch_job_run_summary.py: the example shows failures_by_sig
    but the code emits a flat failed_tests list and dominant_error_patterns; update
    the SKILL.md example to replace the failures_by_sig object with the actual
    "failed_tests": [ { "test_name": "...", "error": "..." } ] field (and remove the
    failures_by_sig section) so the example matches the output produced by
    fetch_job_run_summary.py and references the same keys used by that script.

Nitpick comments:
In @plugins/ci/commands/analyze-regression.md:

  • Around line 692-697: Update the fenced code block that wraps the Jira {code}
    example so it includes a language identifier; locate the triple-backtick block
    containing the lines "{code}", "[Jira:"Test Framework"] there should not be
    mass test failures", and the closing "{code}" and change the opening fence from
    totext (and keep the closing fence unchanged) so the snippet is
    explicitly marked as text for consistent formatting.
  • Around line 939-944: Update the fenced code block that contains the Jira
    {code} wrapper and the test name line
    "[Monitor:kubelet-container-restarts][sig-architecture] platform pods in
    ns/openshift-kube-apiserver should not exit an excessive amount of times" to
    include a language identifier by changing the opening triple-backticks to
    "text" so the block becomes text, then the {code} block and test name, and
    close with ```; ensure the single-line test name remains unchanged inside the
    {code} wrapper.

In @plugins/ci/skills/fetch-job-run-summary/fetch_job_run_summary.py:

  • Around line 94-99: The loop in which you build error_patterns unnecessarily
    declares test_name but never uses it; change the iteration over test_failures to
    use an unused variable name (e.g., replace "for test_name, error_msg in
    test_failures.items()" with "for _, error_msg in test_failures.items()") so the
    intent is clear and linters won't flag the unused variable; this affects the
    block that calls self.extract_error_pattern(error_msg) and updates
    error_patterns.

In @plugins/ci/skills/fetch-job-run-summary/SKILL.md:

  • Around line 48-50: Update the fenced code block in SKILL.md that shows the
    Prow URL pattern so it includes a language identifier; change the opening fence
    from totext so the block reads as a plain-text snippet (the URL example
    near the Prow pattern
    https://prow.ci.openshift.org/view/gs/test-platform-results/logs//<job_run_id>).

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `f809b17d-9e3d-4dd6-9b7a-985e84acd79c`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 7b7e2e0f4714f769a92317d6d29681aa7947fb9b and 1afd0863354b90405cbbbce20555bcc7df0ebc3a.

</details>

<details>
<summary>📒 Files selected for processing (8)</summary>

* `.claude-plugin/marketplace.json`
* `docs/data.json`
* `plugins/ci/.claude-plugin/plugin.json`
* `plugins/ci/commands/analyze-regression.md`
* `plugins/ci/docs/tests.md`
* `plugins/ci/skills/fetch-job-run-summary/SKILL.md`
* `plugins/ci/skills/fetch-job-run-summary/fetch_job_run_summary.py`
* `plugins/ci/skills/fetch-test-runs/fetch_test_runs.py`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment thread plugins/ci/skills/fetch-job-run-summary/SKILL.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/ci/skills/fetch-job-run-summary/SKILL.md`:
- Around line 48-50: The fenced code block in SKILL.md containing the Prow URL
lacks a language identifier; update that block to include a language tag (e.g.,
use ```text) so the snippet is lint-compliant (markdownlint MD040) and remains
displayed as plain text. Locate the fenced block with the URL
"https://prow.ci.openshift.org/view/gs/test-platform-results/logs/<job-name>/<job_run_id>"
and change the opening fence from ``` to ```text (or another appropriate
language identifier).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1b9311e3-4b01-41f7-8abf-7c6f414627e4

📥 Commits

Reviewing files that changed from the base of the PR and between 1afd086 and b920dd4.

📒 Files selected for processing (1)
  • plugins/ci/skills/fetch-job-run-summary/SKILL.md

Comment on lines +48 to +50
```
https://prow.ci.openshift.org/view/gs/test-platform-results/logs/<job-name>/<job_run_id>
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language identifier to the fenced code block.

The fenced block at Line 48 is missing a language tag (markdownlint MD040).

📝 Suggested fix
-```
+```text
 https://prow.ci.openshift.org/view/gs/test-platform-results/logs/<job-name>/<job_run_id>
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 48-48: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/ci/skills/fetch-job-run-summary/SKILL.md` around lines 48 - 50, The
fenced code block in SKILL.md containing the Prow URL lacks a language
identifier; update that block to include a language tag (e.g., use ```text) so
the snippet is lint-compliant (markdownlint MD040) and remains displayed as
plain text. Locate the fenced block with the URL
"https://prow.ci.openshift.org/view/gs/test-platform-results/logs/<job-name>/<job_run_id>"
and change the opening fence from ``` to ```text (or another appropriate
language identifier).

@dgoodwin

Copy link
Copy Markdown
Contributor Author

/test images

@stbenjam

stbenjam commented Mar 16, 2026

Copy link
Copy Markdown
Member

/lgtm
/override ci/prow/images

I think it's OK to merge while the image problems get resolved, images is only used for the agentic Prow jobs

@openshift-ci

openshift-ci Bot commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

@stbenjam: Overrode contexts on behalf of stbenjam: ci/prow/images

Details

In response to this:

/lgtm
/override ci/prow/images

I think it's OK to merge while the image problems get resolved, images is only used for the Prow jobs

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 16, 2026
@openshift-ci

openshift-ci Bot commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgoodwin, stbenjam

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 3af9523 into openshift-eng:main Mar 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants