Skip to content

USHIFT-7409: CI Doctor: list all jobs - #235

Merged
openshift-merge-bot[bot] merged 7 commits into
openshift-eng:mainfrom
pmtk:list-all-jobs
Jul 21, 2026
Merged

USHIFT-7409: CI Doctor: list all jobs#235
openshift-merge-bot[bot] merged 7 commits into
openshift-eng:mainfrom
pmtk:list-all-jobs

Conversation

@pmtk

@pmtk pmtk commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Adds list of all jobs (both successful and failed) for each release. They can also be viewed side by side.
ci-doctor-fold
ci-doctor-unfold
ci-doctor-side-by-side

Summary by CodeRabbit

  • New Features
    • Periodic reports now show release pass rates and detailed job statuses.
    • Added collapsible “All Jobs” panels with job links, completion times, durations, and failure issues.
    • Added side-by-side release views for easier comparison.
    • Selecting a failure issue now highlights and expands the related report entry.
  • Improvements
    • Wider report layouts improve readability.
    • Tables support configurable default sorting.
    • Console summaries now include pass-rate details when available.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 20, 2026
@openshift-ci

openshift-ci Bot commented Jul 20, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pmtk

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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Changes

Periodic job collection now persists per-release status snapshots, and the HTML report loads those snapshots to display pass rates, expandable job tables, failure issue links, and side-by-side Periodics layouts.

Periodic status reporting

Layer / File(s) Summary
Collect and persist periodic status snapshots
plugins/shared/scripts/doctor.sh
Periodic jobs are collected in status mode, written to per-release status files, and summarized with status file paths and total job counts.
Load and render release job status
plugins/shared/scripts/create-report.py
Release status data is loaded, pass rates are calculated, and All Jobs panels link job failures to corresponding Failure Analysis issues.
Periodics layout and interactions
plugins/shared/scripts/create-report.py
The report adds wide and side-by-side layouts, expandable panels, issue-link expansion, configurable default sorting, and a side-by-side toggle control.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: ggiguash, suleymanakbas91

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning Recent commits use Co-Authored-By: Claude Opus 4.6 trailers; no Assisted-by or Generated-by trailers were found. Replace AI-related Co-Authored-By trailers with the approved Assisted-by or Generated-by Red Hat trailer format.
✅ Passed checks (10 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 Changed files contain no weak crypto, custom crypto, or secret/token comparison code; keyword scans found no matches.
Container-Privileges ✅ Passed PASS: The PR only changes report-generation scripts, and repo-wide search found no privileged:true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed No new logging of secrets/PII found; added output is limited to release/repo names, counts, file paths, and non-sensitive status summaries.
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets found in the modified files; scans found no secret-name string assignments, embedded-credential URLs, or long base64-like literals.
No-Injection-Vectors ✅ Passed PASS: The changed files contain no eval/exec/yaml.load/pickle.loads/shell=True/os.system/innerHTML, and new HTML/JS paths use escaped text and quoted shell args.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: CI Doctor now lists all jobs for each release.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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: 2

🧹 Nitpick comments (2)
plugins/shared/scripts/create-report.py (2)

1437-1441: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pass-rate calculation (passed/total/rate) is duplicated in four places.

The same passed = sum(1 for j in status if j.get("status") == "success") / rate = round(passed/total*100) logic is recomputed independently in render_release_section (lines 1440-1441), the overview cards (lines 1748-1750), the TOC (lines 1799-1800), and the console summary (lines 2108-2109). As per path instructions ("avoid derived-state/sync drift (single source of truth)" from CONTRIBUTING.md), extracting a single helper (e.g., _pass_rate(status) -> (passed, total, rate)) and reusing it everywhere would prevent these four call sites from silently drifting if the "success" semantics ever change.

♻️ Proposed helper
def _pass_rate(status):
    total = len(status) if status else 0
    passed = sum(1 for j in status if j.get("status") == "success") if status else 0
    rate = round(passed / total * 100) if total > 0 else 0
    return passed, total, rate

Also applies to: 1746-1751, 1797-1801, 2101-2111

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/shared/scripts/create-report.py` around lines 1437 - 1441, Extract
the duplicated pass-rate calculation into a shared _pass_rate(status) helper
returning passed, total, and rate, handling empty or None status safely. Replace
the independent calculations in render_release_section, the overview cards, the
TOC, and the console summary with calls to this helper so all success semantics
remain centralized.

Source: Path instructions


1699-1729: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

New parsing helpers lack test coverage.

_format_epoch, _format_duration, and _build_job_issue_map are new parsing/mapping logic with several edge cases (missing/invalid values, epoch formatting, empty maps) but no accompanying tests were included in this PR's file set. As per path instructions, "Ensure any new parsing/validation logic has positive+negative tests."

Want me to draft unit tests for these three functions (valid input, missing/None input, malformed input)?

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/shared/scripts/create-report.py` around lines 1699 - 1729, The new
helpers _format_epoch, _format_duration, and _build_job_issue_map need unit-test
coverage. Add positive and negative tests covering valid values, missing or None
inputs, malformed values, empty releases/issues, and affected jobs, including
expected formatting and mapping results; follow the repository’s existing test
conventions.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/shared/scripts/create-report.py`:
- Around line 1699-1704: Update _format_epoch to parse numeric epoch strings
through float before converting to int, matching _format_duration’s handling of
fractional values while preserving the existing UTC formatting and fallback
behavior.
- Around line 1437-1488: Update the sorted_status ordering in the release_status
section to normalize every job’s finished value to a numeric sort key, using
zero for missing or falsy values. Preserve the existing finished-based ordering
while preventing comparisons between numeric timestamps and strings.

---

Nitpick comments:
In `@plugins/shared/scripts/create-report.py`:
- Around line 1437-1441: Extract the duplicated pass-rate calculation into a
shared _pass_rate(status) helper returning passed, total, and rate, handling
empty or None status safely. Replace the independent calculations in
render_release_section, the overview cards, the TOC, and the console summary
with calls to this helper so all success semantics remain centralized.
- Around line 1699-1729: The new helpers _format_epoch, _format_duration, and
_build_job_issue_map need unit-test coverage. Add positive and negative tests
covering valid values, missing or None inputs, malformed values, empty
releases/issues, and affected jobs, including expected formatting and mapping
results; follow the repository’s existing test conventions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 3f92d3bc-1a7c-46d7-977d-2c7db715668b

📥 Commits

Reviewing files that changed from the base of the PR and between 2561ad6 and 67e57f4.

📒 Files selected for processing (2)
  • plugins/shared/scripts/create-report.py
  • plugins/shared/scripts/doctor.sh

Comment thread plugins/shared/scripts/create-report.py
Comment thread plugins/shared/scripts/create-report.py
@pmtk
pmtk marked this pull request as ready for review July 21, 2026 08:23
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 21, 2026
@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 Jul 21, 2026
@copejon

copejon commented Jul 21, 2026

Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 4b894f6 into openshift-eng:main Jul 21, 2026
5 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 29, 2026
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. 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.

2 participants