-
Notifications
You must be signed in to change notification settings - Fork 391
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
manifest,zstd: give priority to zstd
compressed images when pulling image from a manifest list
#1789
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
I’d expect |
2284e25
to
765fc08
Compare
42b2cf4
to
25f81e7
Compare
@vrothberg @mtrmac PTAL again as discussed before I have made it configurable option and later on it can be relayed to |
@flouthoc, I think you need a rebase. |
I’m afraid I’ll only return to this carefully next week. Just to give a brief (aesthetic ?) preference: Eventually most of the compression conversion options (add a variant, drop a variant, ensure a variant exists) are going to exist in So I’d prefer starting with making
But wouldn’t such an option be necessary also for the two OCI transports? That wouldn’t work with It might well make sense to add a |
@mtrmac adding it to
I don't think there is a rush, I think getting this feature in the right way would be better :) |
I’d prefer a separate PR to introduce (probably) Then this PR can add/change the internal |
Extending
That's a fair point. |
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.
One last line I think
1af410c
to
05ea212
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, assuming tests pass.
Thanks!
While perform a pull from manifest list of type `application/vnd.oci.image.index.v1+json` make sure that if more than one image exists for the same platform then give priority to the one compressed with `zstd`. Annotation `io.github.containers.compression.zstd` is expected to be set for the image compressed with `zstd`. Signed-off-by: Aditya R <arajan@redhat.com>
Instrument copy.Image to use ChooseInstanceByCompression so pulling of zstd images can be given priority. Signed-off-by: Aditya R <arajan@redhat.com>
* When d.platform == nil there is no need to iterate `len(manifests)*len(wantedPlatforms)` times and move processing for case `d.platform == nil` outside of the wanted platform loop * Retrofit tests to verify use-cases when platform is nil. Signed-off-by: Aditya R <arajan@redhat.com>
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, nice work!
Setting SystemContext.ArchitectureChoice to "" does not mean "match any/the first platform"; it's the default behavior of SystemContext, and it means "choose for the current runtime architecture". (Originally discussed in containers#1789 (comment) ) I.e. on amd64 these two test cases are redundant with the first two instances above, and on other achitectures (notably ARM) they cause failures. So just drop them. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Setting SystemContext.ArchitectureChoice to "" does not mean "match any/the first platform"; it's the default behavior of SystemContext, and it means "choose for the current runtime architecture". (Originally discussed in containers#1789 (comment) ) I.e. on amd64 these two test cases are redundant with the first two instances above, and on other architectures (notably ARM) they cause failures. So just drop them. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Setting SystemContext.ArchitectureChoice to "" does not mean "match any/the first platform"; it's the default behavior of SystemContext, and it means "choose for the current runtime architecture". (Originally discussed in containers#1789 (comment) ) I.e. on amd64 these two test cases are redundant with the first two instances above, and on other architectures (notably ARM) they cause failures. So just drop them. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Setting SystemContext.ArchitectureChoice to "" does not mean "match any/the first platform"; it's the default behavior of SystemContext, and it means "choose for the current runtime architecture". (Originally discussed in containers#1789 (comment) ) I.e. on amd64 these two test cases are redundant with the first two instances above, and on other architectures (notably ARM) they cause failures. So just drop them. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Setting SystemContext.ArchitectureChoice to "" does not mean "match any/the first platform"; it's the default behavior of SystemContext, and it means "choose for the current runtime architecture". (Originally discussed in containers#1789 (comment) ) I.e. on amd64 these two test cases are redundant with the first two instances above, and on other architectures (notably ARM) they cause failures. So just drop them. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Setting SystemContext.ArchitectureChoice to "" does not mean "match any/the first platform"; it's the default behavior of SystemContext, and it means "choose for the current runtime architecture". (Originally discussed in containers#1789 (comment) ) I.e. on amd64 these two test cases are redundant with the first two instances above, and on other architectures (notably ARM) they cause failures. So just drop them. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
While perform a pull from manifest list of type
application/vnd.oci.image.index.v1+json
make sure that if more than one image exists for the same platform then give priority to the one compressed withzstd
.Annotation
io.github.containers.compression.zstd
is expected to be set for the image compressed withzstd
.For users who wish to test this feature with buildah/podman