Skip to content

fix: preserve nested repository paths in proxy prefetch#626

Open
immanuwell wants to merge 1 commit into
uber:masterfrom
immanuwell:fix/prefetch-nested-repo-path
Open

fix: preserve nested repository paths in proxy prefetch#626
immanuwell wants to merge 1 commit into
uber:masterfrom
immanuwell:fix/prefetch-nested-repo-path

Conversation

@immanuwell

Copy link
Copy Markdown

Fixes proxy prefetch for valid image refs with nested repo paths, like ghcr.io/acme/preheat/team/service:v1

What was up:
DefaultTagParser split on every / and only kept chunks 2 and 3, so registry/preheat/team/service:v1 got turned into preheat/team. Build-index lookup then misses, kinda sneaky

Repro:

  1. Call POST /proxy/v1/registry/prefetch with {"tag":"registry/preheat/team/service:v1"}
  2. Proxy asks build-index for preheat/team
  3. Prefetch fails, even though the image ref is valid

Fix:
Use strings.SplitN(tag, "/", 3) so the full repo tail stays intact

Checks:

  • go test ./proxy/...
  • go test ./proxy/proxyserver -run TestPrefetchV1NestedRepositoryPath -count=10
  • golangci-lint run ./proxy/proxyserver/...

@CLAassistant

CLAassistant commented May 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@thijmv thijmv requested a review from Anton-Kalpakchiev June 9, 2026 16:02
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.

3 participants