Skip to content

kind probe deploys a stale image: mutable :kind tag + default IfNotPresent #815

Done

Description

@athvin

make kind-up does not deploy the image it just built, on any cluster whose node already holds the tag.

scripts/kind_env.sh pins IMAGE_TAG=kind — a mutable tag — and the chart sets no imagePullPolicy, so Kubernetes defaults to IfNotPresent for any tag that is not :latest. The build and docker push both succeed; the node keeps its cached layer.

Measured 2026-11-07: registry served sha256:864efd5e… for :kind while the kind node ran image ID b7b359c38e01b. The event log says it outright — Pulled: Container image "localhost:5001/er-api:kind" already present on machine.

The symptom does not look like a stale image. The pod reported control-plane schema is ahead of this build: column dataset_id is in the live store but not declared for 15 tables, and its startup probe 404'd, so it reads as a schema or health bug. helm --atomic then rolled the release back on timeout.

CI is immune because its cluster is created fresh per run. Local runs are not — and local is exactly where a probe fix or a mutation test gets validated, which makes this a correctness problem for any such exercise: a change that never reached the cluster reports as a pass.

What to do

Either build under a content-addressed tag (er-api:$(git rev-parse --short HEAD)), or kind load docker-image after the push, or set imagePullPolicy: Always for the kind profile. Whichever: verify by imageID, never by the tag.

Related: a long-lived local cluster's control-plane Postgres also drifts — a 5-day-old store had dataset_id nullable where the catalog declares NOT NULL, so the pre-upgrade hook correctly refused 8 breaking diffs. Dropping and recreating the er database fixes it; worth a note in the probe docs.

Refs #645.


Product context (2026-11-26)

Why this matters for the API product: Indirect, it's about merge-gate trust for the batch executor that runs resolution. A local probe or mutation run can pass against an image that never reached the cluster.

Current state: The bug is unchanged on main.

  • scripts/kind_env.sh:23 still sets IMAGE_TAG=kind.
  • Lines 80-83 build the image and docker push it under that tag.
  • Line 108 passes it to helm as images.tag.
  • There is no kind load call, and no imagePullPolicy anywhere under infra/helm/.
  • CI is still immune, because kind.yml creates a fresh cluster each run.
  • None of the commits since filing (2d3a32b, b4b0b0f, 3ed7b57) touch the tag.

Definition of done:

  1. After make kind-up on a cluster that already holds an older :kind image, the running pod's imageID equals the digest just built.
  2. Check by imageID, not by tag, and print it in check_kind.sh's output.
  3. Add one line to the probe docs on recreating a drifted local er database.

Dependencies / sequencing: Do this before #814's mutation work, since #814 depends on a mutated image actually reaching the node.

Size: ~0.1 engineer-weeks. The simplest option is a content-addressed tag such as er-api:$(git rev-parse --short HEAD), plus a dirty-tree suffix.

Activity

  1. added
    ci-backlog
    on Nov 7, 2026
  2. self-assigned this
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ci-backlog

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions