Skip to content

fix(tts-audio): pin the backfill image and make DRY_RUN renderable - #287

Merged
ngeorger merged 1 commit into
mainfrom
fix/tts-audio-backfill-run
Nov 28, 2026
Merged

ngeorger merged 1 commit into
mainfrom
fix/tts-audio-backfill-run

Conversation

@sredevopsorgagents

Copy link
Copy Markdown
Collaborator

Two bugs found by running the backfill after #286 merged, not by reading the manifest.

1. The Job pulled :latest, which does not exist

Merging this with #286 introduced it: rendering the backfill outside the kustomization took it out of images.newTag's reach — that transform only rewrites resources inside the kustomization — so it kept the literal :latest. The first real run died immediately:

tts-backfill-z89nx   0/1   ErrImagePull

It now renders ${WORKER_IMAGE} — the same image:tag the Deployment runs, so a receiver can never queue Jobs on an image it was not built with.

2. DRY_RUN=1 could not work at all

The target set it with kubectl set env job/tts-backfill, which patches the pod template. A Job's pod template is immutable once created, so make backfill-plan failed with field is immutable instead of printing the plan — the exact command the README tells you to run first.

DRY_RUN is now a render-time value like every other (default "0", substituted by render.sh), and the set env hop is gone.

Verification

Against the live cluster, with the merged image deployed:

{"result":"dry-run","scanned":221,"eligible":221,"created":221,"skipped":0,"ineligible":0,"failed":0}

Zero synthesis Jobs created — the plan printed and nothing was queued.

deploy/tts-audio/test.sh ✅ (93 worker tests) with four new assertions: the Job image is pinned to TAG, :latest is rejected, DRY_RUN defaults to 0, and DRY_RUN=1 reaches the Job. Each was checked against an injected regression.

Two bugs in how the backfill Job was plumbed, both found by running it against
the cluster rather than by reading the manifest.

**The Job pulled `:latest`, which does not exist.** Rendering the Job outside the
kustomization took it out of `images.newTag`'s reach — that transform only
rewrites resources *inside* the kustomization — so it kept the literal `:latest`
and died with ErrImagePull on the first run. It now renders `${WORKER_IMAGE}`,
the same `image:tag` the Deployment runs, and `test.sh` fails if `:latest`
comes back.

**`DRY_RUN=1` could not work at all.** The target passed it with
`kubectl set env job/tts-backfill`, which patches the pod template — immutable
once the Job exists — so `make backfill-plan` failed with "field is immutable"
instead of printing the plan. DRY_RUN is now a render-time value like every
other, substituted by render.sh (default "0"), and the set env hop is gone.

Verified end to end against the live cluster:
`{"result":"dry-run","scanned":221,"eligible":221,"created":221,"failed":0}`,
with zero synthesis Jobs created.

Both are covered by new assertions in test.sh, each checked against an injected
regression.
@ngeorger
ngeorger merged commit 12ec9c4 into main Nov 28, 2026
6 checks passed
@ngeorger
ngeorger deleted the fix/tts-audio-backfill-run branch November 28, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants