-
Notifications
You must be signed in to change notification settings - Fork 593
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
Resolve symlinks when fetching file contents #782
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark Test ResultsBenchmark results from the latest changes vs base branch
|
wagoodman
changed the title
Resolve symlinks when fetching file contents
[WIP] Resolve symlinks when fetching file contents
Jan 31, 2022
wagoodman
force-pushed
the
fix-resolver-fetch-contents-for-links
branch
from
February 15, 2022 23:28
74c48cf
to
e66674d
Compare
wagoodman
changed the title
[WIP] Resolve symlinks when fetching file contents
Resolve symlinks when fetching file contents
Feb 15, 2022
wagoodman
force-pushed
the
fix-resolver-fetch-contents-for-links
branch
from
February 17, 2022 14:18
fd8b93d
to
895e805
Compare
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
wagoodman
force-pushed
the
fix-resolver-fetch-contents-for-links
branch
from
February 18, 2022 19:12
0c6d686
to
57cdf45
Compare
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
spiffcs
approved these changes
Feb 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It was noticed that file-classifications was empty for
/bin/busybox
when cataloging the busybox image with the classifications cataloger enabled. Since we have abusybox-binary
classifier, this was unexpected. Primarily this is due to the fact that/bin/busybox
is a symlink to/bin/[
and the classifier filters files considered by filename (in this case**/busybox
, which/bin/[
would never match on). The existing behavior ofsource.FileResolver
when usingFetchContents()
is to only return contents for unresolved links.This PR changes this behavior to resolve symlinks first (for all resolver implementations) before attempting to fetch contents. As a result the file-digests cataloger has been adjusted to only report digests for regular files (don't follow links), which is closest to today's behavior.
Open question: should we have the digests cataloger report digests for resolved paths? or only regular files?Answer: No --it would be confusing to see a symlink have content, and this would be redundant (the real file will be additionally be in the list and the link destination is already reported)
Additional changes: