Repository navigation
Enable storage retention for nuget - #446
Conversation
The handler stores NuGet ids lowercased, but purl keeps nuget names as written, so package rules get lowercased before they're matched. Case in a rule doesn't matter. The mirror stores ids as given, so a mixed-case PURL ends up as a copy clients never get. Until that's fixed, the docs ask for lowercase ids in mirror lists. Refs git-pkgs#306
andrew
left a comment
There was a problem hiding this comment.
Rather than asking users to give proxy mirror lowercase ids, please fix the mirror path. mirrorOne passes the id through to GetOrFetchArtifact as written (internal/mirror/mirror.go:206), so pkg:nuget/Newtonsoft.Json@13.0.3 is stored as pkg:nuget/Newtonsoft.Json while the handler stores and serves pkg:nuget/newtonsoft.json. Mirroring a mixed-case id downloads a copy no client is ever served and never warms the one they use, independent of retention.
Lowercasing the name for nuget before the PURLs are built (in GetOrFetchArtifact or mirrorOne), with a mirror test using a mixed-case id, should be enough. With that in, the lowercase-ids sentence in the nuget docs row can go. The fix can be in this PR or a separate one merged first.
The mirror passed ids through as written, so pkg:nuget/Newtonsoft.Json@13.0.3 was stored under a copy no client is served while the handler kept serving its lowercased one. GetOrFetchArtifact now lowercases nuget names, and the docs no longer ask for lowercase ids in mirror lists. Refs git-pkgs#306
|
Fixed in 5d7855f: |
Refs #306.
Registers nuget for
storage.retention.The handler stores NuGet ids lowercased, but purl keeps nuget names as written, so package rules are lowercased before they're matched. Case in a rule doesn't matter.
The mirror stores ids as given, so a mixed-case PURL ends up as a separate copy that clients are never served. Mirroring it doesn't keep the copy clients use from aging out. Until that's fixed, the docs ask for lowercase ids in mirror lists.