Skip to content

Enable storage retention for conda - #454

Merged
andrew merged 2 commits into
git-pkgs:mainfrom
pinguinfuss:issue-306-retention-conda
Oct 13, 2026
Merged

andrew merged 2 commits into
git-pkgs:mainfrom
pinguinfuss:issue-306-retention-conda

Conversation

@pinguinfuss

Copy link
Copy Markdown
Contributor

The handler stores packages as {channel}/{name}, which purl writes as pkg:conda/conda-forge%2Fnumpy. Package rules name the channel as the namespace (pkg:conda/conda-forge/numpy) and get mapped to that form, with the package name lowercased the way conda treats it. A key without a channel or with an empty part could never match and is refused.

The mirror can't fetch conda packages today, so there's no mirror test.

Refs #306

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

condaRetentionKey accepts any number of channel segments, and the comment says a label channel such as conda-forge/label/rc keeps all its segments. The handler can't store one though: downloads are routed as GET /{channel}/{arch}/{filename}, so {channel} is always a single path segment and the stored name is always {channel}/{name}. A rule like pkg:conda/conda-forge/label/rc/numpy therefore passes validation and matches nothing, which is the case the key mapping refuses for keys without a channel.

Please require exactly two segments (channel and name), drop the label channel sentence from the comment, and flip the conda-forge/label/rc/numpy case in TestCondaRetentionKey to refused. This will also need rebasing for the docs/configuration.md table once the neighbouring retention PRs are in.

The handler stores packages as {channel}/{name}, which purl writes as pkg:conda/conda-forge%2Fnumpy. Package rules name the channel as the namespace (pkg:conda/conda-forge/numpy) and get mapped to that form, with the package name lowercased the way conda treats it. A key without a channel or with an empty part could never match and is refused.

The mirror can't fetch conda packages today, so there's no mirror test.

Refs git-pkgs#306
Downloads are routed as /{channel}/{arch}/{filename}, so the stored name is always {channel}/{name}. A key like pkg:conda/conda-forge/label/rc/numpy passed validation and matched nothing; it's now refused.

Refs git-pkgs#306
@pinguinfuss
pinguinfuss force-pushed the issue-306-retention-conda branch from 198a6a6 to c58cdae Compare October 12, 2026 18:44
@pinguinfuss

Copy link
Copy Markdown
Contributor Author

Fixed in c58cdae: condaRetentionKey now needs exactly a channel and a name, the label channel sentence is gone, and conda-forge/label/rc/numpy is refused in TestCondaRetentionKey (also in its %2F form). Rebased onto main for the docs table.

@pinguinfuss
pinguinfuss requested a review from andrew October 12, 2026 19:48
@andrew
andrew merged commit 131ebc4 into git-pkgs:main Oct 13, 2026
6 checks passed
@pinguinfuss
pinguinfuss deleted the issue-306-retention-conda branch October 13, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants