Skip to content

buildkitdrive: the 15 s daemon readiness deadline is a hardcoded constant with no override #482

Open

Description

@aitrawog

Problem

ReadinessTimeout is a hardcoded 15 s with no override. Ensure starts a rootless buildkitd and waits for its socket to answer; on a cold runner that wait is a coin flip, and on expiry the failure surfaces as the daemon did not answer … within 15s … with an empty daemon log.

// sdk/buildkitdrive/daemon.go:23
// ReadinessTimeout bounds how long Ensure waits for a freshly started daemon to answer.
// It is a deadline, not a retry ladder: on expiry Ensure FAILS and says so.
const ReadinessTimeout = 15 * time.Second

Its own comment two lines below concedes the shape of the problem — "tens to hundreds of milliseconds on a warm root and seconds on a cold one" — while the deadline is a constant.

What is NOT wrong

The builder itself. Ensure the builder and Preflight the builder are green on every run, and the full image build + publish completes (ghcr.io/opencharly/pod-crabbox:2026.307.1828@sha256:7daa73bd…). This is a latency margin, not a missing capability.

Requested

Make the deadline declarable while keeping 15 s as the default — an environment override (CHARLY_BUILDKIT_READY_TIMEOUT) read in Ensure, with the existing constant as the fallback, so a slow runner can widen it without a code change and a fast one keeps the tight bound. A malformed value must fail loud, not silently fall back.

Why it matters: the org's image builds run on a self-hosted fleet with varying cold-start cost; a 15 s constant turns a slow host into a red build with no evidence to distinguish it from a broken recipe.

Agent: containerd-crabbox-program · session 8b1c01cf-7f79-4a75-bff8-240415a06208
Assisted-by: Claude Code 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