-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: map artifacts to commits via repo tags #508
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
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 like for pkg:maven/com.google.guava/[email protected]?type=jar
the commit finder maps the artifact to (adde55ee1f9bc7fb053183b5465f413547c198fe) which is the latest commit on master
.
Can you please create tasks for the following items in the PR description?
- We should cover cases where artifact versions have suffixes that do not match tags.
- If a tag is not found, as we had discussed before, we shouldn't fall back to the latest commit. Instead, the repository should be None to fit it the current data model.
- Since we have a commit mapping feature, we shouldn't need to pin tests in the integration tests to a commit anymore. Just passing the purl should be enough. So, we can probably remove at least some of the -c config.yaml runs in the integration tests with purl
Here is one dependency from apache_maven_root_sbom.json
which we use in our integration tests that is also mapped to the latest commit: pkg:maven/org.junit.jupiter/[email protected]?type=jar
f7259eb
to
f833fff
Compare
…on of string; simplify last array item lookup and string prefix removal; fix failed string replacement Signed-off-by: Ben Selwyn-Smith <[email protected]>
…e commit finder tests to new file Signed-off-by: Ben Selwyn-Smith <[email protected]>
…t of loop and extended to safely support three extensions Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
… comments Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
…tains a version-like part Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
…commit finder unit testing Signed-off-by: Ben Selwyn-Smith <[email protected]>
…try/except in test Signed-off-by: Ben Selwyn-Smith <[email protected]>
…tern; allow exact artefact name as a valid prefix Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
…ved surplus check from commit finder test Signed-off-by: Ben Selwyn-Smith <[email protected]>
…ge; update e2e test file path; extract purl type check into standalone function and add unit test Signed-off-by: Ben Selwyn-Smith <[email protected]>
…ogic Signed-off-by: Ben Selwyn-Smith <[email protected]>
bf9bcb7
to
c27bd35
Compare
…re suitable location Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
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.
I think it's an LGTM for now. Thanks for your work.
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
This feature allows artifacts with a specified version to be mapped to the repository commit they were created from.
The mapping is achieved through use of repository tags, where these tags match the specified version sufficiently.
Tag to version comparisons are performed using regular expression.
Tags are expected to be of the format (with allowances for extra characters):
[<artifact_name>-]<version>
artifact_name
is an optional prefix that matches the name of the related artifact, e.g. "commons-io".<version>
is a string of some number of alphanumeric characters that can be (multi-) separated by any number of non-numeric characters.Examples of accepted tag versions:
v1.2.3
1_2_3
1.2.3-DEV
1.2.3.RELEASE
r1rv23
1.2.3.v123123
Further changes to this PR are in progress: