imagecache: clarify pull retry backoff comments - #1425
Merged
igooch merged 1 commit intoSep 3, 2026
Conversation
Follow-ups from review of the per-registry backoff split: - Replace a stale reference to pullRetryBackoff in the retry test's doc comment; that var was split into dedicatedRegistryBackoff and sharedRegistryBackoff. - Note on the sharedRegistries map that production lookups only ever see index.docker.io (name.ParseReference normalizes docker.io and bare refs), and that the docker.io entry is kept so a lookup by the canonical name classifies the same way. - Document why per-request backoff accumulation cannot turn a sustained shared-registry throttle into a hang: every request carries the caller ctx, a canceled ctx is never retried (at most one backoff sleep of overshoot), and production pulls run under the Run/Restore RPC ctx, which ateapi caps at its server-wide max RPC deadline.
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.
Summary
Comment-only follow-ups to the review comments on #1419 (#1419 (review)):
pullRetryBackoff, which that PR split intodedicatedRegistryBackoffandsharedRegistryBackoff. It now points at the per-registry backoff picked byretryBackoffFor.docker.ioentry (comment): kept the entry (harmless, and a lookup by the canonical name should classify the same way), but the map comment now states plainly that production lookups only ever seeindex.docker.iobecausename.ParseReferencenormalizesdocker.ioand bare refs beforeretryBackoffForruns.remote.WithContext), go-containerregistry's retry transport never retries a context error, so retrying overshoots a deadline by at most one backoff sleep. Production pulls run under the Run/Restore RPC ctx, which ateapi caps atmaxRPCDeadline(10m); the router's parking budget deliberately defers to that server-side deadline. A throttled shared-registry pull therefore surfaces as the RPC's deadline error, not a hang.Test plan
Comment-only change:
go test ./internal/imagecache/,go vet, andgofmtall pass.🤖 Generated with Claude Code