Repository navigation
Enable storage retention for golang - #442
Merged
Merged
Conversation
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
approved these changes
Oct 12, 2026
andrew
left a comment
Contributor
There was a problem hiding this comment.
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.
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.
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.v3on 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.