Add release-info plugin#458
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (11)
✅ Files skipped from review due to trivial changes (6)
🚧 Files skipped from review as they are similar to previous changes (4)
WalkthroughAdds a new "release-info" Claude plugin (v0.0.1): registers the plugin, adds MCP config for Product Pages, documentation, three auto-applying skills (pr-to-release-version, upgrade-path, update-graph), two shell scripts (PR tracing and Cincinnati queries), and a minor skillsaw allowlist change. ChangesRelease-Info Plugin Addition
Sequence DiagramssequenceDiagram
participant User
participant PRScript as pr-to-release-version.sh
participant GH as GitHub API
participant OCP as OpenShift APIs
participant Output
User->>PRScript: PR URL/number + OCP minor
PRScript->>PRScript: Validate tools & pull-secret
PRScript->>GH: Fetch PR metadata
GH->>PRScript: PR state, merge SHA
PRScript->>OCP: Query release stream tags for minor
OCP->>PRScript: Tags & payload pullspecs
PRScript->>OCP: Map repo -> component (oc adm release info)
OCP->>PRScript: Component name / payload commits
PRScript->>PRScript: Enumerate candidate z-streams
loop binary search over z-streams
PRScript->>OCP: Get component commit from payload
OCP->>PRScript: Commit reference
PRScript->>GH: Compare merge commit vs payload commit
GH->>PRScript: Comparison result
end
PRScript->>Output: First z-stream + payload commit + verify URL
sequenceDiagram
participant User
participant UpgradeScript as upgrade-path.sh
participant Cincinnati as Cincinnati API
participant Output
User->>UpgradeScript: Source version + [--channel/--arch/--to]
UpgradeScript->>UpgradeScript: Validate version & set defaults
UpgradeScript->>Cincinnati: Fetch channel graph JSON
Cincinnati->>UpgradeScript: Nodes & edges
UpgradeScript->>UpgradeScript: Verify source node present
alt --to provided
UpgradeScript->>UpgradeScript: Check direct path to target
UpgradeScript->>Output: Reachability + metadata
else no target
UpgradeScript->>UpgradeScript: List direct upgrade targets
UpgradeScript->>Output: Available upgrades
end
UpgradeScript->>Output: Node/edge counts + visualizer link
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (3)
plugins/release-info/skills/upgrade-path/upgrade-path.sh (1)
64-67: ⚡ Quick winConsider adding a timeout to the curl command.
Network issues could cause the script to hang indefinitely. Adding a timeout improves reliability.
Proposed fix
-if ! curl --silent --location --fail --header 'Accept:application/json' \ +if ! curl --silent --location --fail --max-time 30 --header 'Accept:application/json' \ "${UPSTREAM}?channel=${CHANNEL}&arch=${ARCH}" -o "$OUTPUT"; then🤖 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/release-info/skills/upgrade-path/upgrade-path.sh` around lines 64 - 67, The curl call that fetches the graph using UPSTREAM/CHANNEL/ARCH currently has no timeout and can hang; update the curl invocation in upgrade-path.sh (the command using variables UPSTREAM, CHANNEL, ARCH, OUTPUT) to include timeouts such as --connect-timeout (e.g., 10) and --max-time (e.g., 30) and optionally a small --retry (e.g., 3) so the script fails fast and then let the existing die "Failed to fetch graph..." handle the error.plugins/release-info/skills/pr-to-release-version/pr-to-release-version.sh (1)
78-79: ⚡ Quick winAdd timeout to curl command.
Network issues could cause the script to hang indefinitely when fetching release stream tags.
Proposed fix
-TAGS_JSON=$(curl -sf "${RELEASE_CONTROLLER}/api/v1/releasestream/4-stable/tags") \ +TAGS_JSON=$(curl -sf --max-time 30 "${RELEASE_CONTROLLER}/api/v1/releasestream/4-stable/tags") \ || die "Failed to fetch release stream from ${RELEASE_CONTROLLER}"🤖 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/release-info/skills/pr-to-release-version/pr-to-release-version.sh` around lines 78 - 79, The curl call that populates TAGS_JSON can hang on network issues; update the TAGS_JSON assignment (the curl command used to fetch "${RELEASE_CONTROLLER}/api/v1/releasestream/4-stable/tags") to include a timeout option (e.g., curl --connect-timeout and/or --max-time or -m) so the command fails fast and triggers the die fallback; ensure the added timeout values are reasonable for your environment and keep the existing -s and -f flags so failures still cause die "Failed to fetch release stream from ${RELEASE_CONTROLLER}".plugins/release-info/README.md (1)
62-64: ⚡ Quick winAdd prerequisites documentation for the update-graph skill.
The pr-to-release-version (line 54) and upgrade-path (line 60) skills both document their prerequisites, but update-graph does not. For consistency and completeness, add a prerequisites line even if none are required (e.g., "Prerequisites: None (generates links only)").
🤖 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/release-info/README.md` around lines 62 - 64, Add a prerequisites line under the "update-graph" section in README.md to match other skills; edit the "### update-graph" block and insert a line like "Prerequisites: None (generates links only)" immediately after the description so the section documents prerequisites consistently with pr-to-release-version and upgrade-path.
🤖 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/release-info/.mcp.json`:
- Around line 1-11: The pipeline fails because the MCP server entry
"productpages" under the "mcpServers" object is not allowlisted; either remove
the "productpages" entry from the plugins/release-info .mcp.json mcpServers
object if Product Pages capability isn't needed for this release, or add
"productpages" to the central MCP server allowlist (the skillsaw/config that
holds allowed MCP servers) and coordinate any required approvals so the lint
will accept the new server name.
In `@plugins/release-info/README.md`:
- Around line 48-64: Add a new Skills subsection called "product-pages-mcp"
under the existing Skills section alongside pr-to-release-version, upgrade-path,
and update-graph; describe the Product Pages MCP capability and list
prerequisites (authentication requirements from the PR test plan such as
kubeconfig or token and any CLI/tools), include necessary setup steps for the
MCP server (install/configure MCP service, required config files, ports, and how
to authenticate), and reference the examples/overview so users can map the
documented prerequisites and setup to the Product Pages MCP examples shown
earlier.
- Line 27: The example under pr-to-release-version uses a Jira ID
("OCPBUGS-76447") which conflicts with the skill description for
pr-to-release-version that expects GitHub PR references; either replace that
example with a GitHub PR reference consistent with the other examples (e.g., use
a "PR `#1234`" style identifier) or explicitly document that Jira ticket lookups
are supported and describe how a Jira ID is resolved/mapped to the underlying
GitHub PR (add the mapping/lookup behavior and any required configuration).
Ensure the change updates the example line and the pr-to-release-version usage
description so examples and docs remain consistent.
In `@plugins/release-info/skills/pr-to-release-version/pr-to-release-version.sh`:
- Around line 33-38: The argument parsing loop handling the --repo flag does not
validate that a value follows the flag; update the while/case parsing (the case
for "--repo" that assigns REPO="$2") to check that $2 exists and is not another
flag before shifting; if the value is missing or looks like another option, call
usage (or print a clear error) and exit non-zero. Ensure you update the same
parsing block so REPO is only set when a valid value is present and the script
fails with a clear message when --repo is supplied without an argument.
In `@plugins/release-info/skills/pr-to-release-version/SKILL.md`:
- Around line 48-55: Update the fenced code block in SKILL.md to include a
language specifier so the linter stops warning; specifically change the opening
triple backticks that precede the PR example to ```text (the block containing
the PR/Merged/Component/First z-stream/Payload commit/Verification lines) so the
example is treated as plain text by the renderer and linter.
In `@plugins/release-info/skills/update-graph/SKILL.md`:
- Around line 22-24: The fenced code block in SKILL.md containing the URL
template lacks a language specifier; update that fenced block (the
triple-backtick block showing
"https://ctron.github.io/openshift-update-graph#<channel>") to include a
language token such as "text" or "plaintext" (e.g., change ``` to ```text) so
the linter warning is resolved.
In `@plugins/release-info/skills/upgrade-path/upgrade-path.sh`:
- Around line 39-46: The flag parsing in upgrade-path.sh currently does blind
shift 2 for --channel/--arch/--to which breaks under set -u when the next
argument is missing; update the case block that handles --channel, --arch and
--to to validate that a non-empty $2 exists and does not begin with -- before
performing shift 2, otherwise call usage or print a clear error like "Missing
value for --channel" and exit; reference the variables CHANNEL, ARCH, TARGET and
the usage function in your change so the script fails fast with a helpful
message rather than causing an undefined-variable error.
---
Nitpick comments:
In `@plugins/release-info/README.md`:
- Around line 62-64: Add a prerequisites line under the "update-graph" section
in README.md to match other skills; edit the "### update-graph" block and insert
a line like "Prerequisites: None (generates links only)" immediately after the
description so the section documents prerequisites consistently with
pr-to-release-version and upgrade-path.
In `@plugins/release-info/skills/pr-to-release-version/pr-to-release-version.sh`:
- Around line 78-79: The curl call that populates TAGS_JSON can hang on network
issues; update the TAGS_JSON assignment (the curl command used to fetch
"${RELEASE_CONTROLLER}/api/v1/releasestream/4-stable/tags") to include a timeout
option (e.g., curl --connect-timeout and/or --max-time or -m) so the command
fails fast and triggers the die fallback; ensure the added timeout values are
reasonable for your environment and keep the existing -s and -f flags so
failures still cause die "Failed to fetch release stream from
${RELEASE_CONTROLLER}".
In `@plugins/release-info/skills/upgrade-path/upgrade-path.sh`:
- Around line 64-67: The curl call that fetches the graph using
UPSTREAM/CHANNEL/ARCH currently has no timeout and can hang; update the curl
invocation in upgrade-path.sh (the command using variables UPSTREAM, CHANNEL,
ARCH, OUTPUT) to include timeouts such as --connect-timeout (e.g., 10) and
--max-time (e.g., 30) and optionally a small --retry (e.g., 3) so the script
fails fast and then let the existing die "Failed to fetch graph..." handle the
error.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: e8f183ae-a29b-468f-a3da-feb084cd1c18
📒 Files selected for processing (9)
.claude-plugin/marketplace.jsonplugins/release-info/.claude-plugin/plugin.jsonplugins/release-info/.mcp.jsonplugins/release-info/README.mdplugins/release-info/skills/pr-to-release-version/SKILL.mdplugins/release-info/skills/pr-to-release-version/pr-to-release-version.shplugins/release-info/skills/update-graph/SKILL.mdplugins/release-info/skills/upgrade-path/SKILL.mdplugins/release-info/skills/upgrade-path/upgrade-path.sh
a468e28 to
f5d8f77
Compare
…ths, and PR-to-release tracing Provides four capabilities for OCP release lifecycle queries: - Product Pages MCP server for schedules, milestones, GA dates, and contacts - pr-to-release-version skill to trace a PR to its first shipped z-stream - upgrade-path skill to query Cincinnati for available upgrade paths - update-graph skill to link to the interactive upgrade graph visualizer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
f5d8f77 to
4fd71e8
Compare
|
PR needs rebase. DetailsInstructions 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. |
Summary
release-infoplugin with four capabilities for OCP release lifecycle queries:Examples
Ask in natural language — the plugin picks the right tool automatically.
Release schedules and milestones (Product Pages)
Tracing a PR to a release (pr-to-release-version)
Upgrade paths (upgrade-path)
Upgrade graph visualization (update-graph)
Combining tools
Test plan
pr-to-release-versionwith a known merged PR and verify correct z-stream outputupgrade-pathwith a known version and verify Cincinnati resultsctron.github.ioURL is generatedmake lintpasses with zero errors and warnings🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
release-infoplugin with three capabilities: trace GitHub PRs to their first shipped OCP z-stream release, query OpenShift upgrade paths and available updates, and generate links to the interactive OCP update graph visualizer.Documentation