Skip to content

OCPEDGE-3050: Add job exclusion file support to CI Doctor - #283

Open
redhat-chai-bot wants to merge 1 commit into
openshift-eng:mainfrom
redhat-chai-bot:OCPEDGE-3050-exclude-disabled-jobs
Open

OCPEDGE-3050: Add job exclusion file support to CI Doctor#283
redhat-chai-bot wants to merge 1 commit into
openshift-eng:mainfrom
redhat-chai-bot:OCPEDGE-3050-exclude-disabled-jobs

Conversation

@redhat-chai-bot

@redhat-chai-bot redhat-chai-bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a file-based job exclusion mechanism to the CI Doctor's prow-jobs-for-release.sh script, allowing each plugin (LVMS, MicroShift) to maintain its own list of disabled jobs to exclude from reports.

Problem

When CI lanes are disabled in openshift/release (e.g. PR #83972), Prow stops scheduling new runs but data.js continues returning the last historical run. The CI Doctor report keeps showing these stale failures, inflating the failure count.

There was no mechanism to exclude specific job names — the existing --ignore flag only filters Jira bug keys.

Tracked by OCPEDGE-3050 and OCPEDGE-3046.

Changes

  • plugins/shared/scripts/prow-jobs-for-release.sh: Added apply_exclusions() function that reads an optional excluded-jobs.txt from the calling plugin's directory. Uses dirname "${BASH_SOURCE[0]}" (without resolving symlinks) so each plugin symlink picks up its own exclusion file. Backward compatible — when no file exists, output passes through unchanged.

  • plugins/lvms-ci/scripts/excluded-jobs.txt: Lists the 8 disabled LVMS 5.1 QE integration test job substrings (disabled until OCPEDGE-2977 is fixed).

  • plugins/microshift-ci/scripts/excluded-jobs.txt: Template file with format documentation and no active exclusions (ready for use when needed).

How It Works

  1. Each line in excluded-jobs.txt is a substring matched against the full Prow job name
  2. Lines starting with # and empty lines are ignored
  3. Matching jobs are filtered out before the report is generated
  4. Exclusion count is logged to stderr for visibility

AI-generated. Review for accuracy.

@kasturinarra requested via Chai Bot

Summary by CodeRabbit

  • New Features

    • Added support for filtering specified jobs from CI Doctor results on a per-plugin basis.
    • Added documented configuration for excluding matching CI jobs.
  • Improvements

    • Updated the LVMS CI plugin to version 1.4.3.
    • Updated the MicroShift CI plugin to version 1.6.3.
    • CI job filtering now ignores blank lines and comments in exclusion configuration.

@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Sep 8, 2026
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 9cccce06-6112-4c7b-8651-1fff269cd609

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: e9b69ee7-9f07-4860-8775-e91fbc6386f8

📥 Commits

Reviewing files that changed from the base of the PR and between 301e2ac and a8dfb2f.

📒 Files selected for processing (6)
  • .claude-plugin/marketplace.json
  • plugins/lvms-ci/.claude-plugin/plugin.json
  • plugins/lvms-ci/scripts/excluded-jobs.txt
  • plugins/microshift-ci/.claude-plugin/plugin.json
  • plugins/microshift-ci/scripts/excluded-jobs.txt
  • plugins/shared/scripts/prow-jobs-for-release.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The PR adds per-plugin Prow job exclusion files and shared filtering for CI Doctor results. It adds eight LVMS exclusions, documents the MicroShift exclusion format, and bumps both plugin versions from patch releases.

Changes

Prow job exclusions

Layer / File(s) Summary
Plugin exclusion configuration
.claude-plugin/marketplace.json, plugins/lvms-ci/.claude-plugin/plugin.json, plugins/microshift-ci/.claude-plugin/plugin.json, plugins/*/scripts/excluded-jobs.txt
Plugin versions increase to 1.4.3 and 1.6.3. LVMS defines eight excluded job-name substrings. MicroShift adds the exclusion-file format header.
Runtime exclusion filtering
plugins/shared/scripts/prow-jobs-for-release.sh
The shared script locates the caller's excluded-jobs.txt, ignores missing or empty files, and removes jobs matching configured substrings from the latest-job JSON output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to a8dfb

This change adds configurable per-plugin job exclusions and version updates, with no identified current merge-readiness risk.

Suggested reviewers: kasturinarra

🚥 Pre-merge checks | ✅ 9 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
Ai-Attribution ⚠️ Warning AI use is explicit in the PR description and commit. The pull-request commit a8dfb2f contains Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>. It contains no Assisted-by or `Generated-by… Amend the pull-request commit. Remove the AI Co-Authored-By trailer and add the required Red Hat attribution trailer, using Assisted-by or Generated-by with the approved AI identity.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding file-based job exclusion support to CI Doctor.
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-Weak-Crypto ✅ Passed PASS: The changed files add job-name filtering with grep, sed, wc, jq, and contains(). They add no MD5, SHA1, DES, RC4, Blowfish, ECB, custom cryptography, or secret/token comparisons. The r…
Container-Privileges ✅ Passed The pull request changes JSON metadata, text exclusion lists, and a shell script. The diff adds no container or Kubernetes manifest and adds none of the flagged settings: privileged, hostPID, hostNetw…
No-Sensitive-Data-In-Logs ✅ Passed The only new log writes the number of exclusion patterns and the local exclusion-file path to stderr. The added exclusion files contain public job-name substrings and comments, not passwords, tokens, …
No-Hardcoded-Secrets ✅ Passed PASS. The exact pull request diff changes plugin versions, adds Prow job-name exclusion text, and adds filtering logic. No added line contains an API key, token, password, private key, credential assi…
No-Injection-Vectors ✅ Passed No listed injection vector is introduced. The changed shell script uses quoted shell expansions and passes release, component, and exclusion patterns to jq with --arg/--argjson rather than evaluating …
Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (5 skipped: 5 unsupported.)

Full details: Ai-Attribution

Explanation

AI use is explicit in the PR description and commit. The pull-request commit a8dfb2f contains Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;. It contains no Assisted-by or Generated-by trailer. This matches both stated failure conditions.

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

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

@openshift-ci

openshift-ci Bot commented Sep 8, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: redhat-chai-bot
Once this PR has been reviewed and has the lgtm label, please assign eslutsky for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@redhat-chai-bot
redhat-chai-bot force-pushed the OCPEDGE-3050-exclude-disabled-jobs branch 2 times, most recently from 4de3c7c to a8dfb2f Compare September 8, 2026 12:01
@kasturinarra

Copy link
Copy Markdown
Contributor

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@redhat-chai-bot
redhat-chai-bot force-pushed the OCPEDGE-3050-exclude-disabled-jobs branch 3 times, most recently from 8ecba39 to 2659a33 Compare September 8, 2026 14:10
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@redhat-chai-bot
redhat-chai-bot force-pushed the OCPEDGE-3050-exclude-disabled-jobs branch from 2659a33 to 998526c Compare September 8, 2026 15:18
fi

local patterns
patterns=$(grep -vE '^[[:space:]]*(#|$)' "${EXCLUSION_FILE}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' || true)

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.

Is second sed trying to remove spaces, etc around the tokens? If so, simple xargs call does that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants