-
Notifications
You must be signed in to change notification settings - Fork 402
Add warnings about direct use of ImageSource #2742
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
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
Switching to draft, per containers/buildah#6014 (review) :
|
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Updated, PTAL. |
@@ -15,6 +15,9 @@ type UnparsedImage = image.UnparsedImage | |||
// UnparsedInstance returns a types.UnparsedImage implementation for (source, instanceDigest). | |||
// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list). | |||
// | |||
// This implementation of [types.UnparsedImage] ensures that [types.UnparsedImage.Manifest] validates the image | |||
// against instanceDigest if set, or, if not, a digest implied by src.Reference, if any. |
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.
The “implied by” is intentionally a bit vague, there is #1049 and I’m not yet sure how to handle that. For now, we must provide this feature for at least registry references, and in that case the meaning is clear enough.
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
Cc: @Luap99 , I’ve noticed some problematic users recently. I’ll also audit our codebases.