Skip to content

Analyze new job labels and run tracking for regressions - #427

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-eng:mainfrom
dgoodwin:multiple-updates
Apr 21, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift-eng:mainfrom
dgoodwin:multiple-updates

Conversation

@dgoodwin

@dgoodwin dgoodwin commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Enhanced regression analysis with comprehensive job run tracking across the regression's lifetime
    • Added mass-failure detection capabilities for regressions
    • Improved regression start date analysis with detailed job run metrics and symptom labels
    • Updated related-regression matching logic for better correlation detection
  • Chores

    • Updated plugin version to 0.0.38

@openshift-ci
openshift-ci Bot requested review from LuboTerifaj and stbenjam April 21, 2026 13:02
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2026
@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The CI plugin version is bumped from 0.0.37 to 0.0.38 across configuration files. The regression analysis workflow is refactored to leverage aggregated job run data from the API instead of separate fetch calls, changing matching semantics from timestamp-based to job-run-based comparison for related regressions.

Changes

Cohort / File(s) Summary
Version Bumps
.claude-plugin/marketplace.json, docs/data.json, plugins/ci/.claude-plugin/plugin.json
Updated CI plugin version from 0.0.37 to 0.0.38.
Regression Analysis Logic
plugins/ci/skills/fetch-regression-details/fetch_regression_details.py, plugins/ci/skills/fetch-regression-details/SKILL.md, plugins/ci/commands/analyze-regression.md
Enhanced regression fetcher to parse and report job_runs array with metadata (start_time, test_failures). Added label_summary aggregation and per-run annotations. Refactored command logic to derive regression start date directly from job_runs instead of separate test-run fetch calls. Updated output reporting with job-run metrics and mass-failure detection.
Related Triage Matching
plugins/ci/skills/fetch-related-triages/SKILL.md
Changed regression matching semantics from "shared last failure timestamp" to "shared job runs" for confidence level 2 matches.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes across the pull request—adding job labels tracking and run metadata for regression analysis, including version bumps and schema updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Real People Names In Style References ✅ Passed No references to real people's names found in style references, example prompts, instructions, or skill documentation.
No Assumed Git Remote Names ✅ Passed No hardcoded git remote names (origin, upstream) found in PR changes.
Git Push Safety Rules ✅ Passed Pull request contains only version bumps and documentation/code updates related to CI regression analysis with no git push commands or automated workflows.
No Untrusted Mcp Servers ✅ Passed PR introduces no MCP server installations from untrusted sources. Changes include version bumps, documentation updates, and internal code modifications using only standard Python libraries.
Ai-Helpers Overlap Detection ✅ Passed PR modifies only existing CI plugin files, enhancing regression analysis workflow with job label tracking and run metrics. No new commands or skills introduced, and no semantic overlap with teams plugin regression functionality.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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.

🧹 Nitpick comments (2)
plugins/ci/skills/fetch-related-triages/SKILL.md (1)

108-108: Consider documenting the match_reason name retention.

The match_reason value remains same_last_failure but the matching semantics changed to use job_runs. This could confuse consumers expecting the name to reflect the actual matching logic. Consider either adding a note explaining this is for backward compatibility, or updating the API to use a more accurate name like same_job_runs in a future version.

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

In `@plugins/ci/skills/fetch-related-triages/SKILL.md` at line 108, Document that
match_reason "same_last_failure" is retained for backward compatibility even
though matching now uses the job_runs history; update the SKILL.md entry for
same_last_failure to add a brief note stating the semantics now rely on the
job_runs field and suggest using a new name such as "same_job_runs" in a future
API version; reference the match_reason field and the job_runs history in the
note so readers can find the related logic and plan for migration.
plugins/ci/skills/fetch-regression-details/fetch_regression_details.py (1)

463-476: Redundant conditional check.

The if job_runs: check on line 470 is unnecessary since we're already inside the if job_runs: block from line 465.

♻️ Proposed fix
     job_runs = regression.get('job_runs', [])
     if job_runs:
         lines.append(f"Job Runs ({len(job_runs)} total across regression lifetime):")
         high_failure_count = sum(1 for r in job_runs if r.get('test_failures', 0) > 10)
         if high_failure_count:
             lines.append(f"  Runs with mass failures (>10 test failures): {high_failure_count}/{len(job_runs)}")
-        if job_runs:
-            oldest = job_runs[-1]
-            newest = job_runs[0]
-            oldest_date = oldest['start_time'].split('T')[0] if 'T' in oldest['start_time'] else oldest['start_time']
-            newest_date = newest['start_time'].split('T')[0] if 'T' in newest['start_time'] else newest['start_time']
-            lines.append(f"  Date range: {oldest_date} to {newest_date}")
+        oldest = job_runs[-1]
+        newest = job_runs[0]
+        oldest_date = oldest['start_time'].split('T')[0] if 'T' in oldest['start_time'] else oldest['start_time']
+        newest_date = newest['start_time'].split('T')[0] if 'T' in newest['start_time'] else newest['start_time']
+        lines.append(f"  Date range: {oldest_date} to {newest_date}")
         lines.append("")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/ci/skills/fetch-regression-details/fetch_regression_details.py`
around lines 463 - 476, Remove the redundant nested check for job_runs inside
the outer if block: you are already inside the "if job_runs:" branch, so delete
the inner "if job_runs:" condition and dedent its body (the assignment of
oldest/newest, date parsing using oldest['start_time'] and newest['start_time'],
and the lines.append for the date range) so that those statements run directly
under the outer block; keep the high_failure_count logic and final blank line
as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@plugins/ci/skills/fetch-regression-details/fetch_regression_details.py`:
- Around line 463-476: Remove the redundant nested check for job_runs inside the
outer if block: you are already inside the "if job_runs:" branch, so delete the
inner "if job_runs:" condition and dedent its body (the assignment of
oldest/newest, date parsing using oldest['start_time'] and newest['start_time'],
and the lines.append for the date range) so that those statements run directly
under the outer block; keep the high_failure_count logic and final blank line
as-is.

In `@plugins/ci/skills/fetch-related-triages/SKILL.md`:
- Line 108: Document that match_reason "same_last_failure" is retained for
backward compatibility even though matching now uses the job_runs history;
update the SKILL.md entry for same_last_failure to add a brief note stating the
semantics now rely on the job_runs field and suggest using a new name such as
"same_job_runs" in a future API version; reference the match_reason field and
the job_runs history in the note so readers can find the related logic and plan
for migration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c20347cc-47a7-4cff-b388-ebf5814fa64d

📥 Commits

Reviewing files that changed from the base of the PR and between d621f33 and 0d0ba6d.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json
  • docs/data.json
  • plugins/ci/.claude-plugin/plugin.json
  • plugins/ci/commands/analyze-regression.md
  • plugins/ci/skills/fetch-regression-details/SKILL.md
  • plugins/ci/skills/fetch-regression-details/fetch_regression_details.py
  • plugins/ci/skills/fetch-related-triages/SKILL.md

@stbenjam

Copy link
Copy Markdown
Member

/lgtm

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

openshift-ci Bot commented Apr 21, 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 8c54279 into openshift-eng:main Apr 21, 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