-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat(image): adds method to create Associations from remote sources #342
feat(image): adds method to create Associations from remote sources #342
Conversation
Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
9080921
to
56b2a94
Compare
cc @afflom this is ready for logic review |
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.
I was able to test this with m2d and d2m workflows. It works as advertised. Over to @deejross for code review.
@soltysh PTAL (priority 1). Thanks! |
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.
A couple of nits
/lgtm
|
||
skipParse := func(ref string) bool { | ||
seen := bundleAssociations.SetContainsKey(ref) | ||
return seen |
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.
Nit return bundleAssociations.SetContainsKey(ref)
will be more readable.
func GetImageFromBlob(as AssociationSet, digest string) string { | ||
for imageName, assocs := range as { | ||
for _, assoc := range assocs { | ||
for _, dgst := range assoc.LayerDigests { |
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.
Why not use AssociationSet#GetDigest
instead of manually iterating over AssociaciationSet
's?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afflom, jpower432, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jpower432: all tests passed! Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
Signed-off-by: Jennifer Power barnabei.jennifer@gmail.com
Description
This PR adds methods to allow
AssociationSet
information to be gathered from local and remote sources.Related to #302
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist: