Skip to main content

Retry

Automatic retry with exponential backoff for uploads and Docker operations

Anodizer automatically retries failed operations with exponential backoff. Retry behavior is built into upload and Docker stages.

Release uploads

All release asset uploads (GitHub, GitLab, Gitea) use automatic retry with these defaults:

ParameterValue
Max attempts10
Initial delay50ms
Max delay30s
BackoffExponential (delay × 2^(attempt-1))

All upload errors are retried — not just transient HTTP errors. This matches GoReleaser's behavior of wrapping all upload failures as retriable.

There is no user-facing configuration for release upload retries; the defaults are always applied.

Docker retry

Docker build and push operations support configurable retry via the retry field:

crates:
  - name: myapp
    dockers_v2:
      - dockerfile: Dockerfile
        images: ["ghcr.io/owner/myapp"]
        tags: ["{{ Version }}"]
        retry:
          attempts: 10
          delay: "10s"
          max_delay: "5m"

Docker retry config fields

FieldTypeDefaultDescription
attemptsinteger10Maximum number of retry attempts
delaystring10sBase delay between retries (e.g., 500ms, 1s, 2m)
max_delaystring5mMaximum delay cap for exponential backoff

The same retry config is available on:

  • dockers_v2[] — Docker Buildx builds (canonical)
  • docker_manifests[] — Docker manifest creation and push (legacy stitching only)

Duration format

Delay values accept duration strings with these suffixes:

SuffixUnitExample
msmilliseconds500ms
sseconds10s
mminutes2m

A bare number without a suffix is treated as seconds (e.g., 10 = 10s).