Skip to content

Detect zstd in crane append#2023

Merged
jonjohnsonjr merged 1 commit into
google:mainfrom
jonjohnsonjr:zstd
Nov 11, 2024
Merged

Detect zstd in crane append#2023
jonjohnsonjr merged 1 commit into
google:mainfrom
jonjohnsonjr:zstd

Conversation

@jonjohnsonjr
Copy link
Copy Markdown
Collaborator

We assumed everything was gzip, which is not always true!

@brancz
Copy link
Copy Markdown

brancz commented Oct 17, 2024

Can confirm that this patch works for us!

We assumed everything was gzip, which is not always true!

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
@jonjohnsonjr jonjohnsonjr merged commit 6bce25e into google:main Nov 11, 2024
@jonjohnsonjr jonjohnsonjr deleted the zstd branch November 11, 2024 19:17
Comment thread pkg/crane/append.go
if err != nil {
return nil, err
}
defer f.Close()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should close it immediately after PeekCompression?

@slonopotamus
Copy link
Copy Markdown

  1. Does this work properly if blob is feeded through stdin?
  2. I'm not sure this is enough to properly upload a zstd image, Add support for zstd layer upload #1827 involves more changes (and also fixes the issue you're handling here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants