Skip to content

Enable storage retention for golang - #442

Merged
andrew merged 1 commit into
git-pkgs:mainfrom
pinguinfuss:issue-306-retention-golang
Oct 12, 2026
Merged

andrew merged 1 commit into
git-pkgs:mainfrom
pinguinfuss:issue-306-retention-golang

Conversation

@pinguinfuss

Copy link
Copy Markdown
Contributor

Refs #306, builds on #428.

Registers golang for storage.retention.

Package rules use the module path as in go.mod, e.g. pkg:golang/github.com/stretchr/testify. The proxy stores module paths lowercased, so a rule matches whatever case it's written in. A major version (/v2, or .v3 on gopkg.in) is a module of its own and needs its own rule. Keys in the !-escaped form from proxy URLs and the module cache (github.com/!azure/...) are refused at startup, since they could never match.

Because paths are lowercased, two modules that differ only in case already share one cache entry on main. That isn't changed here.

Module paths are stored lowercased, so package rules match whatever case they're written in. A major version like /v2 is its own module and needs its own rule. Keys in the !-escaped form from proxy URLs and the module cache are refused, since they could never match.

Refs git-pkgs#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.

Go module retention rules match the stored cache keys. The tests cover eviction, refetching, case matching, major-version separation, escaped-key rejection, and mirrored modules.

@andrew
andrew merged commit c61cb51 into git-pkgs:main Oct 12, 2026
6 checks passed
@pinguinfuss
pinguinfuss deleted the issue-306-retention-golang branch October 12, 2026 15:04
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