-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add image delete target #8989
Add image delete target #8989
Conversation
Skipping CI for Draft Pull Request. |
/test all |
36a0bbe
to
8bf9dba
Compare
Updated and marked as ready for review |
8bf9dba
to
6fcb37b
Compare
Updated |
6fcb37b
to
ea7af38
Compare
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
original: imageBase(), | ||
input: images.Image{ | ||
Target: ocispec.Descriptor{ | ||
Size: 20, |
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.
wonder why do we use 20 here while all other places have 10?
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.
Should probably document it better, // Input target size determines target digest, base image uses 10
. The digest is generated with the size testcase.original.Target.Digest = digest.FromString(fmt.Sprintf("%s-%d", testcase.name, testcase.original.Target.Size))
so to change the image on update, the size must change
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
@@ -72,6 +73,13 @@ func SynchronousDelete() DeleteOpt { | |||
} | |||
} | |||
|
|||
func DeleteTarget(target *ocispec.Descriptor) DeleteOpt { |
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.
Could we maybe add some godoc here (a la
Lines 66 to 68 in 74e205f
// SynchronousDelete is used to indicate that an image deletion and removal of | |
// the image resources should occur synchronously before returning a result. | |
func SynchronousDelete() DeleteOpt { |
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 <3! (just left a little nit for a comment)
Signed-off-by: Derek McGowan <derek@mcg.dev>
Adds atomicity to image delete when deleting from a list. Signed-off-by: Derek McGowan <derek@mcg.dev>
ea7af38
to
2ce971d
Compare
Updated |
Adds atomicity to image delete when deleting from a list.