-
Notifications
You must be signed in to change notification settings - Fork 4
De-duplicate images in final discovery output #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
komish
left a comment
There was a problem hiding this 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>
b7933d8 to
c8676af
Compare
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). |
komish
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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
productctlside to ingest the new schema.