Skip to content

NO-ISSUE: Release manager helper using Claude skills#6351

Open
ggiguash wants to merge 9 commits intoopenshift:mainfrom
ggiguash:release-manager-claude
Open

NO-ISSUE: Release manager helper using Claude skills#6351
ggiguash wants to merge 9 commits intoopenshift:mainfrom
ggiguash:release-manager-claude

Conversation

@ggiguash
Copy link
Contributor

@ggiguash ggiguash commented Mar 15, 2026

Overview

  • The deterministic part is performed by:
    • microshift-prow-jobs-for-release.sh to extract the last failed jobs per given release to be analyzed
    • microshift-prow-jobs-for-pull-request.sh to extract the list of failed jobs for open pull requests, filtered by rebase PRs only
  • The new analyze-ci-for-release and analyze-ci-for-pull-requests skills use the existing openshift-ci-analysis skill to run on the failed job URLs and produce text summaries
  • The new analyze-ci-for-release-manager skill allows analysis of multiple releases using analyze-ci-for-release and analyze-ci-for-pull-requests, producing an HTML summary.
    • Per-release and rebase-PR information is displayed in separate tabs

Example of command execution

/analyze-ci-for-release-manager 4.18,4.19,4.20,4.21,4.22,main
...
...

● HTML report generated: /tmp/microshift-ci-release-manager-20260316-093048.html          
...
...

❯ /cost                                                                                   
  ⎿  Total cost:            $31.38                            
     Total duration (API):  2h 13m 36s                                                    
     Total duration (wall): 12m 50s                                                       
     Total code changes:    5720 lines added, 0 lines removed                             
     Usage by model:                                                                      
          claude-opus-4-6:  12.0k input, 29.1k output, 6.6m cache read, 184.9k cache write
      ($5.24)                                                                             
        claude-sonnet-4-5:  14.9k input, 308.7k output, 38.6m cache read, 2.6m cache write
      ($26.14)
         claude-haiku-4-5:  1.0k input, 253 output, 0 cache read, 0 cache write ($0.0023)

Mar 16 2026 Status of the example command

HTML summary

List of failed 4.18 jobs

$ .claude/scripts/microshift-prow-jobs-for-release.sh 4.18
JOB                                                                                      STATUS  FINISHED              DURATION  URL
periodic-ci-openshift-microshift-release-4.18-periodics-clusterbot-nightly               ✗       2026-03-15T01:21:22Z  21m4s     https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-microshift-release-4.18-periodics-clusterbot-nightly/2032985282684391424
periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-tests-arm-nightly        ✗       2026-03-15T05:24:31Z  2h54m22s  https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-tests-arm-nightly/2033007816226115584
periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-tests-bootc-arm-nightly  ✗       2026-03-15T04:54:01Z  2h53m42s  https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-tests-bootc-arm-nightly/2033000404932890624
periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-tests-bootc-nightly      ✗       2026-03-15T05:11:23Z  3h11m3s   https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-tests-bootc-nightly/2033000406606417920
periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-tests-nightly            ✗       2026-03-15T05:27:39Z  2h57m30s  https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-tests-nightly/2033007816276447232

List of open rebase PRs

$ .claude/scripts/microshift-prow-jobs-for-pull-requests.sh --filter 'NO-ISSUE: rebase-release'
Fetching open PRs...
Fetching job results...
PR                                                 TITLE                                               ✓  ✗  ⋯   JOBS
https://github.com/openshift/microshift/pull/6357  NO-ISSUE: rebase-release-4.21-4.21.0-0.nightly-...  7  0  6   13
https://github.com/openshift/microshift/pull/6356  NO-ISSUE: rebase-release-4.18-4.18.0-0.nightly-...  6  0  6   12
https://github.com/openshift/microshift/pull/6355  NO-ISSUE: rebase-release-4.19-4.19.0-0.nightly-...  7  0  6   13
https://github.com/openshift/microshift/pull/6354  NO-ISSUE: rebase-release-4.20-4.20.0-0.nightly-...  7  0  6   13
https://github.com/openshift/microshift/pull/6353  NO-ISSUE: rebase-release-4.17-4.17.0-0.nightly-...  6  0  13  19

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 15, 2026
@openshift-ci-robot
Copy link

@ggiguash: This pull request explicitly references no jira issue.

Details

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 15, 2026

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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 15, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 19bc1999-454e-4dca-ac64-5403922e58fb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds three CLI specification docs for CI analysis, two Bash scripts to query MicroShift Prow jobs (release and PR-focused), and updates .claude/settings.json to broaden permissions and register the new skills. Reports are produced under /tmp (text and self-contained HTML).

Changes

Cohort / File(s) Summary
CLI command specs
.claude/commands/analyze-ci-for-release-manager.md, .claude/commands/analyze-ci-for-release.md, .claude/commands/analyze-ci-for-pull-requests.md
New Markdown specifications for CLI workflows: multi-release manager (generates aggregated self-contained HTML report), per-release analyzer (per-job parallel analysis, summary/text reports), and PR analyzer (fetch open PRs, filter, run per-job analysis, aggregate results).
Prow job query scripts
.claude/scripts/microshift-prow-jobs-for-release.sh, .claude/scripts/microshift-prow-jobs-for-pull-requests.sh
Two new Bash tools to fetch and format Prow job data: release-focused script provides fetch_base_data(), query_status(), query_failed(); PR-focused script lists open PRs, per-PR job listings, latest build status retrieval, summary/detail modes, and parallel fetching.
Configuration / Permissions
.claude/settings.json
Broadened runtime permissions (Write(//tmp/**), Bash(*) including sudo/git patterns) and added new skill entries for the CI analysis commands; removed several previously granular Bash allowances.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

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

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 and usage tips.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 15, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ggiguash

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 Mar 15, 2026
@ggiguash
Copy link
Contributor Author

@coderabbitai perform full review

@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

@ggiguash: Sure, kicking off a full review now!

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
.claude/commands/analyze-ci-for-release-manager.md (1)

11-13: Add language identifiers to fenced code blocks.

Static analysis flags missing language specifiers. Use text or bash as appropriate.

Also applies to: 38-40, 46-48, 190-198, 203-205, 208-210, 213-215

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

In @.claude/commands/analyze-ci-for-release-manager.md around lines 11 - 13,
Several fenced code blocks in .claude/commands/analyze-ci-for-release-manager.md
are missing language identifiers; update each triple-backtick block (e.g. the
block containing `/analyze-ci-for-release-manager <release1,release2,...>`) to
use an appropriate language tag such as `text` or `bash`, and apply the same
change to the other reported blocks (lines around 38-40, 46-48, 190-198,
203-205, 208-210, 213-215) so all fenced code blocks include a language
specifier.
.claude/commands/analyze-ci-for-release.md (1)

14-16: Add language identifiers to fenced code blocks.

Static analysis flags these. Use text, bash, or appropriate language.

Also applies to: 50-52, 76-81, 131-182, 188-190, 199-201, 210-212, 236-239, 242-246, 249-252, 264-267, 270-273, 276-279

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

In @.claude/commands/analyze-ci-for-release.md around lines 14 - 16, Several
fenced code blocks (for example the one showing "/analyze-ci-for-release
<release-version> [--limit N]") are missing language identifiers; update every
fenced block in this document to include an appropriate language tag (e.g.,
text, bash, json) so Markdown linters stop flagging them—search for the visible
fenced snippets such as command usages, shell examples, and multi-line outputs
(including the other blocks noted in the review) and add the correct language
identifier after the opening ``` for each.
.claude/scripts/microshift-prow-jobs-for-release.sh (1)

30-61: Status-to-icon logic is duplicated.

The same mapping exists in status_to_icon() (unused) and inline in both jq queries. Consider consolidating.

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

In @.claude/scripts/microshift-prow-jobs-for-release.sh around lines 30 - 61,
Extract the duplicated status-to-icon logic into a single reusable jq function
(e.g. def status_to_icon: if . == "success" then "✓" elif . == "failure" then
"✗" elif . == "pending" then "⋯" else "?" end) and include that function at the
top of both jq program strings used by query_status() and query_failed(),
replacing the inline mapping expressions; also remove the unused shell-level
status_to_icon() helper (or make it call through to the jq function if you
prefer a shell wrapper) so the mapping is defined once and reused by both
query_status() and query_failed().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/commands/analyze-ci-for-release.md:
- Line 4: The description string in analyze-ci-for-release.md uses the wrong
skill name "analyse-ci-test-job"; update that description to use the exact skill
identifier "analyze-ci-test-job" so it matches the entry in
.claude/settings.json and avoids invocation failures—locate the description line
in analyze-ci-for-release.md and replace "analyse-ci-test-job" with
"analyze-ci-test-job".

In @.claude/scripts/microshift-prow-jobs-for-release.sh:
- Around line 13-16: The curl call that fetches "${PROW_URL}" can hang
indefinitely; update the curl invocation (the line using curl -s "${PROW_URL}"
before piping to jq) to include a timeout option (e.g. --max-time or
--connect-timeout and --max-time) so the script fails fast when the Prow server
is slow or unresponsive and still pipes output to jq for the existing filter
using ${release} and ${PROW_JOB}.
- Around line 93-95: The branch handling the --mode option assigns mode="${2}"
and then does shift 2 which will fail under set -u if no value is provided;
update the case arm for --mode to validate the next positional exists and is not
another flag before consuming it (for example check that "${2:-}" is non-empty
and does not start with '-' or ensure $# -ge 2), and if the check fails call the
usage/error path; otherwise set mode="$2" and shift 2 as before. Include
references to the --mode case, the mode variable, and the shift 2 operation so
reviewers can find and apply the guard.

In @.claude/settings.json:
- Around line 5-6: The setting "Bash(*)" in .claude/settings.json grants
unrestricted shell execution; restrict it by replacing "Bash(*)" with explicit,
minimal patterns for only the commands the tools need (for example
"Bash(curl:*)", "Bash(jq:*)", or similar command-specific patterns) and keep
"Write(//tmp/**)" if needed; update the Bash entry(s) to the smallest possible
whitelist to limit scope and remove any broad wildcard usage.

---

Nitpick comments:
In @.claude/commands/analyze-ci-for-release-manager.md:
- Around line 11-13: Several fenced code blocks in
.claude/commands/analyze-ci-for-release-manager.md are missing language
identifiers; update each triple-backtick block (e.g. the block containing
`/analyze-ci-for-release-manager <release1,release2,...>`) to use an appropriate
language tag such as `text` or `bash`, and apply the same change to the other
reported blocks (lines around 38-40, 46-48, 190-198, 203-205, 208-210, 213-215)
so all fenced code blocks include a language specifier.

In @.claude/commands/analyze-ci-for-release.md:
- Around line 14-16: Several fenced code blocks (for example the one showing
"/analyze-ci-for-release <release-version> [--limit N]") are missing language
identifiers; update every fenced block in this document to include an
appropriate language tag (e.g., text, bash, json) so Markdown linters stop
flagging them—search for the visible fenced snippets such as command usages,
shell examples, and multi-line outputs (including the other blocks noted in the
review) and add the correct language identifier after the opening ``` for each.

In @.claude/scripts/microshift-prow-jobs-for-release.sh:
- Around line 30-61: Extract the duplicated status-to-icon logic into a single
reusable jq function (e.g. def status_to_icon: if . == "success" then "✓" elif .
== "failure" then "✗" elif . == "pending" then "⋯" else "?" end) and include
that function at the top of both jq program strings used by query_status() and
query_failed(), replacing the inline mapping expressions; also remove the unused
shell-level status_to_icon() helper (or make it call through to the jq function
if you prefer a shell wrapper) so the mapping is defined once and reused by both
query_status() and query_failed().

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 96f88164-5cb9-45af-821b-c07181a022a7

📥 Commits

Reviewing files that changed from the base of the PR and between a22d929 and 686a165.

📒 Files selected for processing (4)
  • .claude/commands/analyze-ci-for-release-manager.md
  • .claude/commands/analyze-ci-for-release.md
  • .claude/scripts/microshift-prow-jobs-for-release.sh
  • .claude/settings.json

@ggiguash
Copy link
Contributor Author

/test verify
@coderabbitai perform full review

@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

@ggiguash: Sure, kicking off a full review now!

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

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

Inline comments:
In @.claude/commands/analyze-ci-for-release-manager.md:
- Around line 11-13: The markdown contains unlabeled fenced code blocks (for
example the fence with "/analyze-ci-for-release-manager
<release1,release2,...>") which triggers MD040; update each unlabeled
triple-backtick fence (including the other ranges mentioned) by adding an
appropriate language identifier such as bash, text, or html so the fences become
like ```bash or ```text; ensure you pick the label that best matches the snippet
content for consistent rendering and markdownlint compliance.
- Around line 163-164: The tab switching relies on an implicit global event;
update the inline handlers to pass the event explicitly (e.g., call
showTab(event, 'periodics') / showTab(event, 'pull-requests') instead of
showTab('...')) and change the showTab function signature to accept an event
parameter (e.g., function showTab(e, tabName)) and use e.target instead of
event.target; also update any other calls/usages of showTab (the other
occurrences around the tab-handling block) to the new two-argument form so they
no longer rely on the implicit global event.

In @.claude/commands/analyze-ci-for-release.md:
- Around line 22-23: Replace all occurrences of the mixed agent identifiers so
the document uses a single callable name "analyze-ci-test-job" everywhere
instead of "openshift-ci-test-job"; update every reference (e.g., the lines
showing "openshift-ci-test-job" and "analyze-ci-test-job" at the noted sections
and any headings, examples, or step lists) to the canonical
"analyze-ci-test-job" to ensure deterministic orchestration and consistent
invocation.
- Around line 14-16: Add explicit language identifiers to all fenced code blocks
flagged by markdownlint (MD040) so the blocks render and lint correctly; e.g.,
mark shell/command examples like "/analyze-ci-for-release <release-version>
[--limit N]" with a bash (or sh) tag and use text/plain or none for non-code
output blocks — update every fenced block mentioned in the review (including the
command example and the other flagged blocks) to include the appropriate
language tag.

In @.claude/settings.json:
- Around line 8-12: The entries Skill(analyze-ci-for-release-manager),
Skill(analyze-ci-for-release), Skill(analyze-ci-test-job),
Skill(analyze-ci-test-scenario), and Skill(analyze-sos-report) in the settings
are referencing command files (they exist under .claude/commands/) but not
actual skill/agent definitions, which will fail at runtime; fix by either (A)
adding matching agent/skill definitions named exactly
analyze-ci-for-release-manager, analyze-ci-for-release, analyze-ci-test-job,
analyze-ci-test-scenario, and analyze-sos-report under your agents/skills store
so Skill(...) points to real agents, or (B) remove these Skill(...) grants and
replace them with the appropriate slash-command invocations (or Command(...)
entries) that reference the existing command definitions (e.g., use the command
identifier for analyze-ci-for-release-manager etc.), ensuring the settings.json
entries match the actual artifact types present.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 70c7b89e-9758-4d69-b1c8-128c64cddd1b

📥 Commits

Reviewing files that changed from the base of the PR and between a22d929 and 02f361e.

📒 Files selected for processing (6)
  • .claude/commands/analyze-ci-for-pull-requests.md
  • .claude/commands/analyze-ci-for-release-manager.md
  • .claude/commands/analyze-ci-for-release.md
  • .claude/scripts/microshift-prow-jobs-for-pull-requests.sh
  • .claude/scripts/microshift-prow-jobs-for-release.sh
  • .claude/settings.json

@ggiguash ggiguash marked this pull request as ready for review March 17, 2026 15:29
@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 Mar 17, 2026
@ggiguash
Copy link
Contributor Author

/verified by @ggiguash

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 17, 2026
@openshift-ci-robot
Copy link

@ggiguash: This PR has been marked as verified by @ggiguash.

Details

In response to this:

/verified by @ggiguash

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from eslutsky and vanhalenar March 17, 2026 15:33
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2026

@ggiguash: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants