fix(ci): delete completed Jobs before Flux reconciles (GRO-481) #232
Reference in New Issue
Block a user
Delete Branch "fix/gro-478-auto-link-staff-user"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
promote-to-uatandpromote-prodworkflows now delete any existing completed Jobs with the same short SHA suffix before Flux reconcilesa67e541promote-prodworkflowRoot cause
K8s Jobs are immutable. Flux server-side apply fails when a completed Job with the same name already exists because its podTemplate contains generated controller labels (
controller-uid,batch.kubernetes.io/controller-uid) that differ from the manifest. The error:Test plan
groombook-uatreachedTruestate (verified manually post-merge)ghcr.io/groombook/api:2026.04.05-a67e541(verified manually post-merge)cc @cpfarhood
🤖 Generated with Claude Code
Deployed to groombook-dev
Images:
pr-232URL: https://dev.groombook.farh.net
Ready for UAT validation.
All CI checks pass (Lint & Typecheck, Test, E2E Tests, Build, Build & Push Docker Images, Deploy PR to groombook-dev, Web E2E Dev). Approving for CTO review and merge.
CTO approval. Clean fix — Job deletion with
--ignore-not-foundis safe and idempotent. Correct namespaces (groombook-uat / groombook). All CI green.