-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add pipeline to publish scan to federatedcode #1400
Conversation
keshav-space
commented
Oct 7, 2024
- Closes Create script to store and publish a ScanCode.io scan in the FederatedCode Git-based architecture federatedcode#23
- Addon pipeline to push package scan to federatedcode Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
a1771f6
to
930a5cc
Compare
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
@pombredanne as per your suggestion, I’ve added the PURL field to the project.
|
@keshav-space Could you provide some context about the need for adding a |
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.
Missing documentation about the concept of publishing to federatedcode.
We want to store the scancode.io scan results in git repositories, and we use PURL to determine the git repository and the exact directory path where the scan should be stored. This optional
Project uuid would be specific to a particular scancode.io instance. We want to store package scan/vulnerability data in a way that it can be retrieved using just the PURL, which won't be possible with uuid.
Sure, let's discuss this and we can split this into two different PRs.
My understanding was that the product name and product version were closely related to DejaCode. |
This should be documented in the code.
You're right, this seems quite untreated. |
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
is there something missing to get this merged? |
- namespace package should not contain __init__.py - see https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#native-namespace-packages Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[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.
@keshav-space The code looks pretty good, we are almost ready for merge, see the last few comments.
Also, is this https://github.com/aboutcode-org/scancode.io/pull/1400/files#diff-71c80d25cae67eed0aa112b1d847002632d97e7f223d9df6109d39d9e26bc577 a wanted change? That file is needed for proper packaging.
Signed-off-by: Keshav Priyadarshi <[email protected]>
@tdruez yes, namespace package directory should not contain
In that case, instead of having an empty import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__) This should work for both packaging and namespace package. |
Fair enough, but it seems quite unrelated to the context of this PR. It would be better to open an issue for discussion. |
It is related to this PR because the pipeline uses another namespace package, File "/scancode.io/scanpipe/pipelines/publish_to_federatedcode.py", line 25, in <module>
from scanpipe.pipes import federatedcode
File "/scancode.io/scanpipe/pipes/federatedcode.py", line 35, in <module>
from aboutcode import hashid
ImportError: cannot import name 'hashid' from 'aboutcode' (/scancode.io/aboutcode/__init__.py)
make: *** [Makefile:126: test] Error 1 |
Thanks for the clarification. Let's merge then! |