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
Introduce minimal source coordinates #623
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
force-pushed
the
first-class-relationships
branch
from
November 16, 2021 15:56
628c2e4
to
77406a7
Compare
wagoodman
force-pushed
the
split-location
branch
from
November 16, 2021 19:16
1d26197
to
2949587
Compare
wagoodman
force-pushed
the
split-location
branch
from
November 17, 2021 18:26
de146b7
to
5c5da78
Compare
spiffcs
approved these changes
Nov 17, 2021
luhring
approved these changes
Nov 17, 2021
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.
Looks cool!
…addressing Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
wagoodman
force-pushed
the
split-location
branch
from
November 18, 2021 18:07
7492f06
to
3333709
Compare
spiffcs
added a commit
that referenced
this pull request
Nov 18, 2021
* main: Introduce minimal source coordinates (#623)
fengshunli
pushed a commit
to fengshunli/syft
that referenced
this pull request
Jan 24, 2022
* split source.Location and create source.Coordinates for minimal path addressing Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * move coordinates into separate file Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * Update syft/source/coordinates.go Co-authored-by: Dan Luhring <luhring@users.noreply.github.com> Signed-off-by: fsl <1171313930@qq.com>
GijsCalis
pushed a commit
to GijsCalis/syft
that referenced
this pull request
Feb 19, 2024
* split source.Location and create source.Coordinates for minimal path addressing Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * move coordinates into separate file Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * Update syft/source/coordinates.go Co-authored-by: Dan Luhring <luhring@users.noreply.github.com>
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.
Today we have
source.Location
to represent any and all location information. This includes the real path (path with no links), virtual path (path that may have links), filesystem ID (image layer ID), andfile.Reference
resolved from stereoscope. All of this information is useful in different circumstances.However, there are critical use cases for having an object that has the minimal amount of information to be able to find a location within a source. This minimal information is real path and filesystem ID. The use case in question is being able to craft an index used within
sbom.SBOM.Artifacts
without necessarily having virtual path or afile.Reference
. If you've indexed a location with a virtual path but want to access that index with only real path information then it would not be possible without creating additional indexes.This PR introduces a new
source.Coordinates
object that contains this minimal information and changes all maps withinsbom.SBOM.Aritfacts
to usesource.Coordinates
as keys (instead ofsource.Location
).This PR helps to unblock anchore/grype#395 and #476 while further helping along #556.
Note: this PR base branch isfirst-class-relationships
which is under review under PR #607 . This PR will remain in draft until #607 is merged.