Repository navigation
Count stored publish times under their ecosystem in the stats - #646
Merged
Merged
Conversation
Cooldown stores the publish time of every version it looks up, also of packages nobody downloaded, which have no package row. The ecosystem stats counted those versions as unattributed. They now count under the type of their package PURL; only a PURL that can't be parsed stays unattributed.
Covers namespaced npm and Maven PURLs, a publish time under an alias of a package row's ecosystem, and a PURL starting with the orphan prefix, and checks the per-ecosystem versions against GetCacheStats' total.
andrew
approved these changes
Nov 2, 2026
andrew
left a comment
Contributor
There was a problem hiding this comment.
One small thing: the versionEcosystem doc comment says the ecosystems that store publish times are named like their PURL types, which is not true for Go (golang vs go). It works because mergeAliasedEcosystems folds them together afterwards, so the comment should say that instead.
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 ecosystem breakdown on the dashboard showed an "unattributed" row with 0 B downloaded on a proxy whose artifacts all had package rows.
The row came from the versions count. Cooldown stores the publish time of each version it looks up, through
SetVersionPublishedAt, also for packages nobody downloaded, such as modules only resolved withgo list -mor@latest. Those versions have no package row, soGetEcosystemStatsput them under "unattributed". On my instance that was 148 versions of six Go modules and two npm packages.They now count under the type of their package PURL, which is the ecosystem name for every ecosystem that stores publish times. Only a package PURL that can't be parsed stays unattributed, so the totals still reconcile with
GetCacheStats.Creating the missing package rows instead doesn't work for Go: publish times are keyed by the escaped module path, so a module with capitals would get a second package row next to the one its downloads create.