Skip to content

ensure-image: a failed base-image pull reports remedies but not the registry's reason, so the cause cannot be classified #1172

Open

Description

@aitrawog

Finding

When charly cannot fetch a base image it reports that the fetch failed but not why, so the
failure is indistinguishable from a transient network blip and the operator is left to re-run and hope:

ensure-image "ubuntu:26.04": not present locally, pull failed, and no buildable short-name match in
charly.yml — make the registry public, log in to the registry, or pre-build the image manually), and no
local build was possible for it

Measured while gating a bed: with that message in hand, an immediate podman pull ubuntu:26.04 of the
same reference succeeded, which is the only reason the run could continue. The underlying registry
response — a 429 rate limit, a 401, a DNS failure, a truncated read — is not in the message, so the
mechanism cannot be classified from the log.

Mechanism

The pull error is wrapped into a fixed sentence that lists REMEDIES ("make the registry public, log in,
or pre-build") without carrying the cause. Because all the remedies are also plausible for unrelated
causes, the message actively suggests the wrong conclusion: a rate limit reads as an auth problem, and
a genuine auth problem reads as something a re-run will fix.

Missed control

Nothing distinguishes a retryable registry failure from a permanent one, so the only observable
difference is whether a later attempt happens to work — which is exactly the "retry and see" pattern
the rulebook forbids as a diagnosis. A run that fails here can only be resolved by manual experiment
outside the tool.

Blast radius

Every cold build (any base image not already in local storage) on an organisation whose CI regularly
hits Docker Hub's unauthenticated limit. It turns a one-line, self-classifying error into a manual
investigation, and it makes an honest RCA impossible: the run's own log does not contain the evidence
needed to name the cause.

Suggested fix

Carry the registry's response into the error — the HTTP status and any WWW-Authenticate / rate-limit
hint, and the transport error for a non-HTTP failure — so a 429, a 401 and a DNS failure are
distinguishable from the message alone. Where a retry is genuinely warranted for one of those classes,
say so in the message rather than leaving the operator to discover it by experiment.

Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

Activity

  1. added
    category:delivery
    type:fix
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:deliverytype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions