Skip to content

bug: retry.Do retries 401/403 auth errors instead of failing immediately #494

@aftersnow

Description

@aftersnow

Description

In pkg/backend/pull.go:116-129 and push.go:92-99, layer processing is wrapped in retry.Do(...) with default config (6 attempts, 5s initial delay, exponential backoff up to 60s) from retry.go:25-29.

The retry is unconditional — it retries ALL errors including 401 Unauthorized and 403 Forbidden. Auth errors should fail immediately since retrying with the same credentials will never succeed and just wastes ~30s+ of user time.

Expected behavior

Auth errors (HTTP 401, 403) should be detected and excluded from retry, failing immediately with a clear authentication error message.

Current behavior

Auth errors are retried 6 times with exponential backoff, taking 30+ seconds before ultimately failing with the same auth error.

Severity

Minor — usability issue, wastes user time but does not corrupt data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions