-
Notifications
You must be signed in to change notification settings - Fork 203
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
manifests,push: add support for AddCompression
#1585
manifests,push: add support for AddCompression
#1585
Conversation
We need vendor of: containers/image#1987 first. |
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 idea and general approach LGTM
- I don’t feel strongly about the “replicate” name… it’s fairly imprecise (we are not replicating anything when asking for zstd and the image already is zstd), OTOH it’s nicely short
- There are several reasons why this doesn’t even compile, so it apparently hasn’t been tried at all…
- (Vendoring a c/image commit in this PR is fine… now that the c/image PR was merged.)
@mtrmac Yes we need a better name since a similar flag is going to be in @giuseppe @vrothberg @rhatdan Any naming ideas other than |
libimage/manifests/manifests.go
Outdated
@@ -70,6 +71,7 @@ type PushOptions struct { | |||
RemoveSignatures bool // true to discard signatures in images | |||
ManifestType string // the format to use when saving the list - possible options are oci, v2s1, and v2s2 | |||
SourceFilter LookupReferenceFunc // filter the list source | |||
ReplicateWithCompression []string // replicate required imges with requested compression algorithms |
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.
CompressionVariants
would be ~ consistent with c/image I think.
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.
do have any names in mind
I can’t think of anything clearly better. Something broadly like “ensure has compression”? But using a simpler and shorter word than “ensure” would be nice.
(BTW until c/image tags a release, we can rename the c/image options if we find a good name.)
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.
c/image
has option as EnsureCompressionVariantsExist
we can name this as same and later CLI can have --ensure-compression
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.
--ensure-compression
sounds more like a validation check to me.
53146f9
to
fa665ac
Compare
Signed-off-by: Aditya R <[email protected]>
1330fd1
to
7816121
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.
Code LGTM.
I don’t know whether we can improve on the naming. One very reasonable answer is that c/common explicitly does not have a stable API, so we can change our mind at any time in the future, and it is not worth worrying about much in this repo.
OTOH we do need to settle on a name we are happy with for the CLI options, which are presumably going to come immediately after this PR.
7816121
to
93f7f8d
Compare
Yes I agree, lets decide it on the CLI PR, where I am going to add this i.e buildah and later skopeo we can decide it there. @vrothberg @giuseppe @rhatdan PTAL |
I think we should decide here, otherwise we're just going to reopen the very same conversation.
A "replica" to me is a 1:1 copy of an original which is not 100 accurate here I think. I like the term "variant" or "instance". |
Ah my idea was that flag will ensure that |
Hm ... there is already a |
@vrothberg Technically |
I found a few, does any one of these appeal ? ( |
Very fair point, @flouthoc. In that case, I really like |
I like |
`c/image` recently added support for EnsureCompressionVariantsExist, following PR exposes the feature to `c/common` manifests so actual users can use it. Signed-off-by: Aditya R <[email protected]>
93f7f8d
to
44dacb8
Compare
ReplicateWithCompression
AddCompression
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: flouthoc, vrothberg 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 |
/lgtm |
@mtrmac Following PR is merged, do we need to change option name in |
My first instinct is that I don’t feel too strongly about that, though. |
Fair enough leaving |
Podman uses different API for pushing manifest list, add `AddCompression` to ManifestPushOptions, which is implemented here: containers#1585 [NO NEW TESTS NEEDED] Tests are added here: containers#1585 Signed-off-by: Aditya R <[email protected]>
Podman uses different API for pushing manifest list, add `AddCompression` to ManifestPushOptions, which is implemented here: containers#1585 [NO NEW TESTS NEEDED] Tests are added here: containers#1585 Signed-off-by: Aditya R <[email protected]>
Podman uses different API for pushing manifest list, add `AddCompression` to ManifestPushOptions, which is implemented here: containers#1585 [NO NEW TESTS NEEDED] Tests are added here: containers#1585 Signed-off-by: Aditya R <[email protected]>
Podman uses different API for pushing manifest list, add `AddCompression` to ManifestPushOptions, which is implemented here: containers#1585 [NO NEW TESTS NEEDED] Tests are added here: containers#1585 Signed-off-by: Aditya R <[email protected]>
c/image
recently added support for EnsureCompressionVariantsExist, following PR exposes the feature toc/common
manifests so actual users can use it.Needs: containers/image#1987