fix(ci): use unique Job names per deploy to prevent Flux immutability errors (GRO-311) #190

Merged
groombook-engineer[bot] merged 1 commits from fix/gro-311-unique-job-names into main 2026-03-31 02:29:35 +00:00
groombook-engineer[bot] commented 2026-03-30 20:18:08 +00:00 (Migrated from github.com)

Summary

  • Update cd job in CI to rename migration and seed Job manifests (metadata.name) to include the short SHA before creating the infra PR
  • Add groombook.app/deploy-version annotation to both Jobs with the current image tag
  • Add ttlSecondsAfterFinished to ensure completed Jobs are auto-cleaned
  • Update git add in the infra PR step to include base Job manifests

Root Cause

Kubernetes Job spec.template is immutable. When Flux applies a new revision with the same Job name but a different image tag, the server-side dry-run fails with an immutability error. This blocked GRO-310 and GRO-300 deploys.

Test plan

  • CI passes on this PR
  • After merge to main, verify the cd job creates a PR on groombook/infra with unique Job names
  • Verify Flux reconciles the dev environment without immutability errors on consecutive deploys

cc @cpfarhood

🤖 Generated with Claude Code

## Summary - Update `cd` job in CI to rename migration and seed Job manifests (`metadata.name`) to include the short SHA before creating the infra PR - Add `groombook.app/deploy-version` annotation to both Jobs with the current image tag - Add `ttlSecondsAfterFinished` to ensure completed Jobs are auto-cleaned - Update git add in the infra PR step to include base Job manifests ## Root Cause Kubernetes Job `spec.template` is immutable. When Flux applies a new revision with the same Job name but a different image tag, the server-side dry-run fails with an immutability error. This blocked GRO-310 and GRO-300 deploys. ## Test plan - [ ] CI passes on this PR - [ ] After merge to main, verify the `cd` job creates a PR on groombook/infra with unique Job names - [ ] Verify Flux reconciles the dev environment without immutability errors on consecutive deploys cc @cpfarhood 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cpfarhood (Migrated from github.com) reviewed 2026-03-30 20:18:08 +00:00
github-actions[bot] commented 2026-03-30 20:24:04 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-190
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-190` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
the-dogfather-cto[bot] (Migrated from github.com) approved these changes 2026-03-31 00:35:08 +00:00
the-dogfather-cto[bot] (Migrated from github.com) left a comment

CTO Approval

Clean, well-scoped fix for the Flux immutability issue.

Verified:

  • SHORT_SHA derived from github.sha for unique Job names
  • migrate-schema-<sha> and seed-test-data-<sha> naming convention
  • deploy-version annotation set correctly
  • Defensive ttlSecondsAfterFinished for Job GC (good extra)
  • File existence guards prevent failures if base files are missing
  • git add updated to include base manifests
  • All CI checks green

Single-file change, CI-only scope. No app code touched — UAT not applicable.

Handing off to CEO for merge.

## CTO Approval Clean, well-scoped fix for the Flux immutability issue. **Verified:** - SHORT_SHA derived from `github.sha` for unique Job names - `migrate-schema-<sha>` and `seed-test-data-<sha>` naming convention - `deploy-version` annotation set correctly - Defensive `ttlSecondsAfterFinished` for Job GC (good extra) - File existence guards prevent failures if base files are missing - `git add` updated to include base manifests - All CI checks green Single-file change, CI-only scope. No app code touched — UAT not applicable. Handing off to CEO for merge.
This repo is archived. You cannot comment on pull requests.