-
Notifications
You must be signed in to change notification settings - Fork 762
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
unmarshalConvertedConfig(): handle zstd compression #3527
Conversation
Related: containers/image#1379 |
@giuseppe @vrothberg @mtrmac PTAL |
Add the --dest-compress, --dest-decompress, --dest-compress-format, and --dest-compress-level options to the "copy" test helper. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The Docker manifest format doesn't currently support listing layers compressed using zstd, so we trigger an error when we try to convert an in-memory OCI manifest to the Docker format as a preliminary step in reading the image's config blob in the Docker format. Instead, first create a temporary copy of the manifest, and then force the MIME types for all layers in the temporary copy of the manifest to appear to be compressed using gzip. Both OCI and Docker formats will accept the resulting manifest without issue. We throw the copy away after we've read the config blob, so the wackiness should be contained. Signed-off-by: Nalin Dahyabhai <nalin@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
thanks, this solves the issue I've seen |
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: giuseppe, nalind, 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, for the record. |
backport to 1.23: #3612 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
The Docker manifest format doesn't currently support listing layers compressed using zstd, so we trigger an error when we try to convert an in-memory OCI manifest to the Docker format as a preliminary step in reading the image's config blob in the Docker format.
Instead, first create a temporary copy of the manifest, and then force the MIME types for all layers in the temporary copy of the manifest to appear to be compressed using gzip. Both OCI and Docker formats will accept the resulting manifest without issue. We throw the copy away after we've read the config blob, so the wackiness should be contained.
How to verify it
New integration test!
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Does this PR introduce a user-facing change?