-
Notifications
You must be signed in to change notification settings - Fork 210
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
Use 4-tier system for storing package metadata #1609
Conversation
- The 4-tiers are super large, large, medium, and small, which correspond to 1024, 128, 32, and 1 repository, respectively Signed-off-by: Keshav Priyadarshi <[email protected]>
Signed-off-by: Keshav Priyadarshi <[email protected]>
328e6f0
to
d139fc7
Compare
Signed-off-by: Keshav Priyadarshi <[email protected]>
e4071d1
to
662ddcb
Compare
""" | ||
if isinstance(purl, str): | ||
purl = PackageURL.from_string(purl) | ||
|
||
purl_hash = get_purl_hash(purl) | ||
bit_count = BIT_COUNT_BY_ECOSYSTEM.get(purl.type, 0) |
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.
IMO if we don't have an ecosystem we should not simply consider bit as 0. We should log it ?
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.
We can throw an exception here. In any case if we have not provisioned git repo for that unknown ecosystem aboutcode-org/scancode.io#1400 pipeline will fail. Earlier we were using 13-bit as the default option, but after discussion with @pombredanne we agreed on using a single repository (0-bit) for ecosystems not covered in our exhaustive list.
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.
LGTM! Minor nit for your consideration
The tiers are as follows: