Skip to content

Package/version DB rows are keyed by non-canonical PURL #207

Description

@andrew

Artifact caching stores MakePURLString(ecosystem, name, ...) output directly as packages.purl and versions.purl (see internal/handler/handler.go around updateCacheDB). MakePURLString does not apply per-type PURL normalization, so the key reflects whatever the client sent.

For case-insensitive ecosystems this creates duplicate rows for the same package: pip install Django writes pkg:pypi/Django, pip install django writes pkg:pypi/django, and both cache the same artifacts under different keys.

Fixing this means normalizing the key on write and on lookup, plus migrating existing rows to canonical form and merging duplicates. Noting it here rather than folding into #201 since it needs a data migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions