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

refactor: registryless oci_image #550

Merged
merged 1 commit into from
May 7, 2024
Merged

refactor: registryless oci_image #550

merged 1 commit into from
May 7, 2024

Conversation

thesayyn
Copy link
Collaborator

@thesayyn thesayyn commented May 2, 2024

BREAKING CHANGES

  • Uncompressed archives in the tars attribute is no longer compressed when creating the image, this might make images bigger compared to 1.x. Use pkg_tar#compression or tar#compress attribute to compress the layers beforehand.
  • Digests of images created 1.x rules_oci will not match 2.x rules_oci, as we are no longer using crane to create the images. However, images should stay the same semantically.

CHANGES

CHECKLIST

  • detailed description
  • add the layer with correct media type when base image is docker + add a test for it.
  • use hermetic zstd
  • run against distroless to check breakages, ask some of our customers to see if breaks anything.
  • run a benchmark

oci/private/image.sh Outdated Show resolved Hide resolved
@thesayyn thesayyn force-pushed the ref_oci_image branch 19 times, most recently from 88d4654 to 065b114 Compare May 4, 2024 04:43
@thesayyn thesayyn marked this pull request as ready for review May 4, 2024 04:48
@mortenmj
Copy link
Contributor

mortenmj commented May 4, 2024

Did a quick test here. Everything builds/tests fine, but running an oci_tarball gives an error like this:

open /var/lib/docker/tmp/docker-import-1867629837/blobs/sha256/a74371ebe00e8fad96ff8f7ec8421e280fd0828ecdd38457c8a2f7c1ceb1b870.tar.gz: no such file or directory

@thesayyn
Copy link
Collaborator Author

thesayyn commented May 5, 2024

yeah, there's an unrelated change in this PR. thanks for the info!

@thesayyn
Copy link
Collaborator Author

thesayyn commented May 5, 2024

@mortenmj did you see any significant speed-up/slow-down, do you have an before-after?

@thesayyn thesayyn force-pushed the ref_oci_image branch 2 times, most recently from 8d17c5f to 2c1c3a2 Compare May 5, 2024 03:27
@thesayyn
Copy link
Collaborator Author

thesayyn commented May 6, 2024

Benchmark: distroless building all images 5m 17s -> 3m 59s

@thesayyn thesayyn force-pushed the ref_oci_image branch 4 times, most recently from de2d4f0 to b1a71f4 Compare May 6, 2024 22:17
@thesayyn
Copy link
Collaborator Author

thesayyn commented May 6, 2024

Distroless all green!

Breaking changes are observed here: GoogleContainerTools/distroless#1586 (comment) 🌮

@thesayyn thesayyn force-pushed the ref_oci_image branch 3 times, most recently from cefe927 to 3036da8 Compare May 6, 2024 22:37
@thesayyn thesayyn requested a review from alexeagle May 6, 2024 22:39
@thesayyn thesayyn force-pushed the ref_oci_image branch 2 times, most recently from f224682 to 0a67cc7 Compare May 7, 2024 00:10
@thesayyn
Copy link
Collaborator Author

thesayyn commented May 7, 2024

PTAL again, this is now ready.

@hanikesn
Copy link

hanikesn commented May 7, 2024

Great work!

@hunshcn
Copy link
Contributor

hunshcn commented Jun 12, 2024

There seems to be an error in the description, which should be pkg_tar#extension.

Maybe this generation refers to the compression options, but it is confusing.

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