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
builder/dockerfile: ADD with best-effort xattrs #47175
builder/dockerfile: ADD with best-effort xattrs #47175
Conversation
Thinking of this; I wonder if we're trying too much here. While we could copy these attributes; they may not be portable when pushing the image. ISTR there even was code that explicitly excludes xattrs (with a limited set of allowed ones) for portability 🤔 (but I'd have to dig where). So perhaps we shouldn't even do so; otherwise we may end up with attributes that are available locally, but that get discarded after pushing / pulling the image. Here's some prior tickets / comments that seem relevant related to that;
|
We've been copying xattrs when |
b647e79
to
ab6d760
Compare
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.
Doesn't this affect the pull flows as well (and load, import, build context transfer in legacy builer etc)? Does it make sense to add new WithBestEffortXattrs
rather than just restoring the old xattr behavior.
Archives being unpacked by Dockerfiles may have been created on other OSes with different conventions and semantics for xattrs, making them impossible to apply when extracting. Restore the old best-effort xattr behaviour users have come to depend on in the classic builder. The (archive.Archiver).UntarPath function does not allow the options passed to Untar to be customized. It also happens to be a trivial wrapper around the Untar function. Inline the function body and add the option. Signed-off-by: Cory Snider <csnider@mirantis.com>
Adding a parameter—even a variadic one—is an API breaking change, and therefore would be unsuitable for backporting to v25. I'm going to rewrite this PR to not touch the pkg/archive API |
ab6d760
to
5bcd2f6
Compare
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
Archives being unpacked by Dockerfiles may have been created on other OSes with different conventions and semantics for xattrs, making them impossible to apply when extracting. Restore the old best-effort xattr behaviour users have come to depend on in the classic builder.
Buildkit will need to opt into best-effort xattr behaviour separately.
- What I did
- How I did it
- How to verify it
TODO regression test
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)