Skip to content

Conversation

@caxu-rh
Copy link
Contributor

@caxu-rh caxu-rh commented Jun 11, 2025

This change modifies DiscoveredImage to store the name/type of one or more containers which use the image, and it also adds a new Insert method on Manifest, which acts similarly to the built-in append except duplicate entries are merged into the existing DiscoveredImage instance in the list.


A corresponding change is still needed on the productctl side to ingest the new schema.

@exe-prow-github-app exe-prow-github-app bot requested a review from komish June 11, 2025 17:57
Copy link
Collaborator

@komish komish left a comment

Choose a reason for hiding this comment

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

Couple of comments in-line. The only other thing I'll mention is that I'd like to keep the exported API surface to a minimum. The addition of methods on the exported structs makes them a part of the API surface. I'd say make the unexported methods unless absolutely necessary (here, just meaning - if you don't need them to enable other code within this repo, unexport them).

We can always promote them to exported at a later time.

Thanks for your work @caxu-rh

This change modifies DiscoveredImage to store the name/type of one
or more containers which use the image, and it also adds a new
appendToManifest function, which acts similarly to the built-in
append except duplicate entries are merged into the existing
DiscoveredImage instance in the list.

Signed-off-by: Caleb Xu <caxu@redhat.com>
@caxu-rh caxu-rh force-pushed the deduplicate-image-output branch from b7933d8 to c8676af Compare June 12, 2025 15:29
@caxu-rh
Copy link
Contributor Author

caxu-rh commented Jun 12, 2025

I'd like to keep the exported API surface to a minimum.

Noted, I was able to change the receiver methods into regular, unexported methods instead (and removed functions for Manifest equality check and DiscoveredContainer equality check, which are no longer needed).

Copy link
Collaborator

@komish komish left a comment

Choose a reason for hiding this comment

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

/lgtm

@exe-prow-github-app exe-prow-github-app bot added the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2025
@exe-prow-github-app
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caxu-rh, komish

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

@exe-prow-github-app exe-prow-github-app bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 12, 2025
@caxu-rh caxu-rh merged commit f41b642 into opdev:main Jun 12, 2025
1 of 2 checks passed
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants