Use 4-tier system for storing package metadata#1609
Merged
keshav-space merged 3 commits intomainfrom Oct 11, 2024
Merged
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 <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
328e6f0 to
d139fc7
Compare
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
e4071d1 to
662ddcb
Compare
TG1999
reviewed
Oct 11, 2024
| purl = PackageURL.from_string(purl) | ||
|
|
||
| purl_hash = get_purl_hash(purl) | ||
| bit_count = BIT_COUNT_BY_ECOSYSTEM.get(purl.type, 0) |
Contributor
There was a problem hiding this comment.
IMO if we don't have an ecosystem we should not simply consider bit as 0. We should log it ?
Member
Author
There was a problem hiding this comment.
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.
TG1999
approved these changes
Oct 11, 2024
Contributor
TG1999
left a comment
There was a problem hiding this comment.
LGTM! Minor nit for your consideration
This file contains hidden or 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
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.
The tiers are as follows: