Skip to content

Add node image RPM diff to release info API response#750

Open
stbenjam wants to merge 1 commit intomainfrom
discrepencies
Open

Add node image RPM diff to release info API response#750
stbenjam wants to merge 1 commit intomainfrom
discrepencies

Conversation

@stbenjam
Copy link
Copy Markdown
Member

@stbenjam stbenjam commented Mar 31, 2026

Summary

  • Adds nodeImageRpmDiff field to the APIReleaseInfo struct, exposing the RPM package diff between previous and current node images in the JSON API response
  • The RPM diff is fetched concurrently alongside the existing changelog generation, so it adds no additional latency
  • This data was previously only available on the HTML page but missing from the API

🤖 Generated with Claude Code

Testing locally works for me:

  "nodeImageRpmDiff": {
    "changed": {
      "kernel": {
        "old": "6.12.0-211.5.1.el10_2",
        "new": "6.12.0-211.6.1.el10_2"
      },
      "kernel-core": {
        "old": "6.12.0-211.5.1.el10_2",
        "new": "6.12.0-211.6.1.el10_2"
      },
      "kernel-modules": {
        "old": "6.12.0-211.5.1.el10_2",
        "new": "6.12.0-211.6.1.el10_2"
      },
      "kernel-modules-core": {
        "old": "6.12.0-211.5.1.el10_2",
        "new": "6.12.0-211.6.1.el10_2"
      },
      "kernel-modules-extra": {
        "old": "6.12.0-211.5.1.el10_2",
        "new": "6.12.0-211.6.1.el10_2"
      }
    }
  }

From http://localhost:8080/api/v1/releasestream/4.22.0-0.nightly/release/4.22.0-0.nightly-2026-03-30-221541?from=4.22.0-0.nightly-2026-03-30-132356

Summary by CodeRabbit

Release Notes

New Features

  • Release information now includes RPM package differences between node image versions, providing detailed package-level insights into version changes.

The API was missing the node image RPM diff data that the HTML page
displays. This adds a nodeImageRpmDiff field to the APIReleaseInfo
struct and fetches it concurrently alongside the changelog generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0d806838-8394-4f9a-bfc2-3e82f411a497

📥 Commits

Reviewing files that changed from the base of the PR and between 6dda498 and bb361e8.

📒 Files selected for processing (2)
  • cmd/release-controller-api/http.go
  • pkg/release-controller/types.go

📝 Walkthrough

Walkthrough

The changes extend the APIReleaseInfo struct with a new optional NodeImageRpmDiff field and add logic to compute it concurrently while rendering changelog data. When both previous and current public pull specs are available, an RPM diff is retrieved via an existing method and included in the API release response payload.

Changes

Cohort / File(s) Summary
APIReleaseInfo Struct Extension
pkg/release-controller/types.go
Added optional NodeImageRpmDiff *RpmDiff field to APIReleaseInfo struct with JSON tag nodeImageRpmDiff,omitempty.
RPM Diff Computation and Population
cmd/release-controller-api/http.go
Integrated concurrent RPM diff retrieval into apiReleaseInfo function; calls c.releaseInfo.RpmDiff() when previous and current pull specs exist, with errors logged at verbosity level 4 and otherwise ignored; result populated into NodeImageRpmDiff field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A diff of RPMs, concurrent and swift,
Fields added with grace, a structured gift,
Errors handled kindly, results on display,
The API now richer in every way! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding a node image RPM diff field to the release info API response, which is reflected in both the struct addition and the API payload changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch discrepencies

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

@openshift-ci openshift-ci bot requested review from AlexNPavel and hoxhaeris March 31, 2026 12:30
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: stbenjam
Once this PR has been reviewed and has the lgtm label, please assign bradmwilliams 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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant