-
Notifications
You must be signed in to change notification settings - Fork 379
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
set correct media types during manifest updates and conversions #563
Conversation
Tested locally and maybe incomplete w.r.t. to real mime type of the destination layers. |
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.
ACK on the copy
idea, though it will need generalizing.
I can’t see why the dir:
part is necessary (or if it is, why none of the other transports need something similar).
Also, |
Thanks for the pointer! |
I think that's the code in question, right? |
No (no mention of compression). https://github.com/containers/buildah/blob/4bcddb7cbec960f93f4fea229cc45d9192349b17/image.go#L112 and callers. (My overall impression is that this should not be reused, but it should mostly go away; at least in the case of pushes to |
@TomSweeneyRedHat @nalind @rhatdan FYI, we might need to revisit that code in buildah. |
I think this is @nalind code. I am fine with changing it. |
@vrothberg Any movement on this? |
No, but I need to get this done soon. Other things flew in, but my PR-pipeline is getting smaller. |
@vrothberg Ping, looking to create a new release of containers image, any movement? |
51b1a63
to
636e5d2
Compare
@mtrmac, PTAL. The current approach works in local smoke tests but maybe I miss something. |
00c1d1f
to
529f074
Compare
529f074
to
6e282b5
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.
(A quick pass, may not be quite comprehensive. Highlights: c/storage, and where should / shouldn’t BlobInfo.Compression*
be available.)
b93a495
to
01d0302
Compare
af7f9bc
to
81ee6de
Compare
@mtrmac, if you have some cycles, PTAL. Notable changes from today:
I'll do some more smoke tests tomorrow but a code-review would be great. |
81ee6de
to
29253fb
Compare
Smoke tests are looking good. CI is green. We're getting closer. The last remaining issue is whether we should pretend that Schema 2 supported Zstd or not (and error out during conversion). @estesp, once that's in and re-vendored, buildah/containerd will like each other again. |
29253fb
to
46105ce
Compare
46105ce
to
926461e
Compare
I think we should throw an error unless you are using OCI images. |
@vrothberg that works for me |
926461e
to
33c7e1e
Compare
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Also check for supported media types when parsing a v2s2/OCI1 manifest. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
33c7e1e
to
69aa1e8
Compare
@nalind, mind taking a look? We are receiving more and more requests to get those fixes finally in and I am getting impatient. |
LGTM |
When copying an image, record the compression in the BlobInfo and use
the information when updating the manifest's layer infos to set the
layers' media types correctly.
Fixes: github.com/containers/podman/issues/2013
Fixes: github.com/containers/buildah/issues/1589
Signed-off-by: Valentin Rothberg [email protected]