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

feat: add command to run repo and commit finder without analysis #827

Merged
merged 17 commits into from
Nov 11, 2024

Conversation

benmss
Copy link
Member

@benmss benmss commented Aug 15, 2024

This pull request adds a new command find-source that requires a PURL, and optionally accepts a repository path as input. If no repository path is provided, the command will call the Repo Finder and Commit Finder to find the repository and commit of the provided PURL. If a repository is provided as input, only the Commit Finder will be called.

Closes #781

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 15, 2024
@benmss benmss marked this pull request as ready for review August 15, 2024 05:27
@tromai
Copy link
Member

tromai commented Aug 16, 2024

I tried to run the find-source command against a Maven PURL that doesn't have a version:

$ macaron find-source -purl pkg:maven/org.apache.maven/maven
2024-08-16 11:16:55,421 [INFO] Setting the output directory to .../output
2024-08-16 11:16:55,422 [INFO] The logs will be stored in debug.log
2024-08-16 11:16:55,424 [ERROR] Could not find repo for PURL: pkg:maven/apache/maven

I believe we don't support Maven PURL without a version now -

if not version:
logger.debug("Version missing for maven artifact: %s:%s", group, artifact)
# TODO add support for Java artifacts without a version
return ""

However, the debug message doesn't show up if I ran it without the verbose flag. I believe we should let the user of the find-source command know about this behavior by default.

@tromai
Copy link
Member

tromai commented Aug 16, 2024

I also think it's great to add an integration test case for the new command too (may be we can revisit this after we settle on how to return the results to the user).

@benmss benmss force-pushed the 781-expose-commit-finder-on-cli branch from d431cab to bee7c06 Compare October 30, 2024 09:22
Copy link
Member

@tromai tromai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

…finding and commit finding for a PURL, or commit finding for a PURL and repo

Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
…r cloning repos for tags; move report schema to separate file with test case; test both tag methods in integration case

Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
@behnazh-w behnazh-w self-requested a review November 8, 2024 02:56
Signed-off-by: Ben Selwyn-Smith <[email protected]>
@benmss benmss force-pushed the 781-expose-commit-finder-on-cli branch from f0c6c5b to cab7bad Compare November 8, 2024 03:07
@benmss benmss merged commit 2d4582f into staging Nov 11, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants