Skip to content

Retry transient registry auth token requests - #7109

Open
charle-z wants to merge 1 commit into
moby:masterfrom
charle-z:fix/6981-auth-token-retry
Open

Retry transient registry auth token requests#7109
charle-z wants to merge 1 commit into
moby:masterfrom
charle-z:fix/6981-auth-token-retry

Conversation

@charle-z

@charle-z charle-z commented Sep 2, 2026

Copy link
Copy Markdown

Fixes #6981.

Registry blob and manifest fetches already use BuildKit's resolver retry handler for transient transport failures, but registry token HTTP requests bypassed that path. A connection reset or 5xx from the token endpoint therefore failed authorization immediately.

This change reuses the same existing retry classification and backoff for token HTTP requests in both the resolver and session auth provider. The existing GET/POST fallback behavior for 401/404/405 is unchanged, and permanent errors such as 403 are not retried.

Validation:

  • go test ./session/auth/... ./util/resolver/... -count=1
  • go test -race ./session/auth/... ./util/resolver/... -count=1
  • go vet ./session/auth/... ./util/resolver/...
  • git diff --check

The full make validate-all gate requires Docker/buildx, which is not available in the local validation environment.

Signed-off-by: Carlos Acosta <93443910+charle-z@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auth token fetch is not retried on transient network errors (unlike blob/manifest fetches)

1 participant