Skip to content
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

fix(gzip)!: change the default block size (#529) #553

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

rchincha
Copy link
Contributor

BREAKING CHANGE: the default gzip block size is changed to 256<<12, was previously 256<<10.

A tar layer with the same content but compressed with different gzip blocksize will result in different sha256sums in the final OCI Image. Ecosystem tools have one current size in use and stacker's current size differ.

Interactions between a stacker-built OCI image and ecosystem tools which recompress lower layers results in bloated registries which will have identical tar content but different compressed sha256 blobs.

Unfortunately, the OCI image spec doesn't standardize/encode this in the specification document. Hence, we change to the current common block size used in the ecosystem here in the stacker implementation.

We now link against our own fork: github.com/project-stacker/umoci which may change depending on the PR getting merged to upstream.

(cherry picked from commit 0cf2d70)

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

BREAKING CHANGE: the default gzip block size is changed to 256<<12, was
previously 256<<10.

A tar layer with the same content but compressed with different gzip
blocksize will result in different sha256sums in the final OCI Image.
Ecosystem tools have one current size in use and stacker's current size
differ.

Interactions between a stacker-built OCI image and ecosystem tools which
recompress lower layers results in bloated registries which will have
identical tar content but different compressed sha256 blobs.

Unfortunately, the OCI image spec doesn't standardize/encode this in the
specification document. Hence, we change to the current common block
size used in the ecosystem here in the stacker implementation.

We now link against our own fork: github.com/project-stacker/umoci
which may change depending on the PR getting merged to upstream.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
(cherry picked from commit 0cf2d70)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
@rchincha rchincha force-pushed the upstream-rel-0.40.x branch from 4f4977a to 4d4f9e4 Compare November 17, 2023 03:04
@rchincha rchincha merged commit acffdc1 into project-stacker:rel-0.40.x Nov 17, 2023
6 of 7 checks passed
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.

1 participant