Skip to content

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

Open
stbenjam wants to merge 2 commits intomainfrom
discrepencies
Open

OCPCRT-458: Add node image RPM diff to release info API response#750
stbenjam wants to merge 2 commits 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

  • New Features
    • Release payloads now include per-node-image stream entries showing name, tag, and optional RPM diffs.
    • When per-stream diffs aren't available, a fallback single RPM diff is provided so node-image changes remain visible.
    • RPM diff retrieval errors are logged and do not break the release response; missing diffs may be omitted.

@coderabbitai
Copy link
Copy Markdown
Contributor

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 Plus

Run ID: d23bc28a-0e13-4022-b1f6-f8b6a8261216

📥 Commits

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

📒 Files selected for processing (2)
  • cmd/release-controller-api/http.go
  • pkg/release-controller/types.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/release-controller/types.go

📝 Walkthrough

Walkthrough

The APIReleaseInfo payload now includes a list of per-machine-OS image stream entries (NodeImageStreams) populated concurrently while rendering changelog data. Each entry contains stream name, tag, and an optional RPM diff obtained either per-stream or via a fallback single diff; diff errors are logged and otherwise ignored.

Changes

Cohort / File(s) Summary
API types
pkg/release-controller/types.go
Added NodeImageStreams []APINodeImageStream \json:"nodeImageStreams,omitempty"`toAPIReleaseInfoand introducedAPINodeImageStream (Name, Tag, optional RpmDiff`).
API handler / diff population
cmd/release-controller-api/http.go
apiReleaseInfo now spawns a goroutine to build NodeImageStreams by listing machine OS streams for the tag, falling back to a single RPM diff when none exist; attempts per-stream RpmDiffForStream when possible; logs diff/list errors at V(4) and does not surface them in the response.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant APIHandler as Release API Handler
  participant ReleaseInfo as releaseInfo service
  participant StreamStore as MachineOS Streams Store
  participant RpmService as RPM diff service

  Client->>APIHandler: GET /release info
  APIHandler->>ReleaseInfo: gather base release data (changelog, results...)
  APIHandler->>StreamStore: list machine OS streams for tag (async)
  alt streams found
    StreamStore-->>APIHandler: list of streams
    loop per stream
      APIHandler->>RpmService: RpmDiffForStream(previousRef, currentRef, stream)
      RpmService-->>APIHandler: rpmDiff or error
      APIHandler-->ReleaseInfo: append APINodeImageStream(Name, Tag, rpmDiff?)
    end
  else no streams
    APIHandler->>RpmService: RpmDiff(previousTagPullSpec, tagPullSpec)
    RpmService-->>APIHandler: rpmDiff or error
    APIHandler-->ReleaseInfo: append single APINodeImageStream(fallback name/tag, rpmDiff?)
  end
  ReleaseInfo-->>APIHandler: NodeImageStreams populated (maybe empty/missing diffs)
  APIHandler-->>Client: JSON response (includes nodeImageStreams)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I dug through streams with a curious twitch,
Spawned a goroutine, made diffs in a stitch,
Names and tags gathered, small carrots of change,
Errors logged softly, the payload arranged. 🌱

🚥 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 summarizes the main change: adding node image RPM diff data to the release info API response, matching the core modification across both modified files.
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

@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.

stbenjam and others added 2 commits April 17, 2026 09:23
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>
Replace the single nodeImageRpmDiff field with a nodeImageStreams array
that returns per-stream RPM diffs (e.g. rhel-coreos and rhel-coreos-10
separately). For older payloads without multiple streams, falls back to
the legacy single RpmDiff wrapped in a one-element array.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Apr 17, 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 "5.0.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

  • New Features
  • Release payloads now include per-node-image stream entries showing name, tag, and optional RPM diffs.
  • When per-stream diffs aren't available, a fallback single RPM diff is provided so node-image changes remain visible.
  • RPM diff retrieval errors are logged and do not break the release response; missing diffs may be omitted.

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
Copy Markdown
Contributor

openshift-ci bot commented Apr 17, 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

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