Skip to content

OCPCRT-458: Add node image RPM diff to release info API response#750

Open
stbenjam wants to merge 1 commit intomainfrom
discrepencies
Open

OCPCRT-458: 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

📝 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.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: adding a node image RPM diff field to the release info API response, which aligns with the core modifications in the changeset.

✏️ 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.

@stbenjam stbenjam changed the title Add node image RPM diff to release info API response OCPCRT-458: Add node image RPM diff to release info API response Apr 3, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 3, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Apr 3, 2026

@stbenjam: This pull request references OCPCRT-458 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

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.

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.

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants