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

ggcr: crane.Export not handling whiteout files in single-layer images #1623

Closed
bcrochet opened this issue Apr 4, 2023 · 0 comments · Fixed by #1629
Closed

ggcr: crane.Export not handling whiteout files in single-layer images #1623

bcrochet opened this issue Apr 4, 2023 · 0 comments · Fixed by #1629
Labels
bug Something isn't working

Comments

@bcrochet
Copy link

bcrochet commented Apr 4, 2023

Describe the bug

crane.Export has an optimization that skips the mutate.Extract call if there is only a single layer. However, it is possible to have an image that has opaque whiteouts in the only layer. While not usually a problem, there are other [1] libraries that expect there to be no hidden files, and therefore throw errors. When calling mutate.Extract, it works as expected.

To Reproduce

crane export quay.io/integreatly/3scale-bundle:v0.8.0 3scale.tar

This produces a tarball that still has .wh..wh..opq files.

Expected behavior

No .wh. files at all.

Additional context

I haven't figured this out yet, but I suspect that these .wh..wh..opq files are being generated by flattening a 2-layer image that is FROM scratch. Regardless, crane.Export should handle these. Currently it leaves them in place.

  • latest version
  • quay.io here, but observed with other registries
@bcrochet bcrochet added the bug Something isn't working label Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant