fix(ci): export SHORT_SHA + fix(db): deterministic staff IDs (GRO-355) #193
Reference in New Issue
Block a user
Delete Branch "fix/gro-352-short-sha-export"
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
exporttoSHORT_SHAbash variable on line 317 of.github/workflows/ci.yml.yq env(SHORT_SHA)on lines 330 and 339 requires an environment variable, not just a shell variable. Withoutexport,yqreceives an empty string and the job fails on every merge tomain.uuid()staff IDs with deterministic IDs (c0000001-...) inseed.ts. Fixes FK violation onappointments.staff_idwhen seed re-runs on existing database. Root cause:onConflictDoUpdatewithtarget: emailupdated staff rows but preserved original IDs; new UUIDs generated each run caused mismatch with appointment references.Root Causes
0d610f5) introducedSHORT_SHA="${SHA::7}"as a shell variable, butyq env()only reads environment variables.uuid()in seed;onConflictDoUpdatewithtarget: emailpreserved original IDs on re-run, causing appointment FK violations.Test Plan
Update Infra Image Tagsjob no longer fails due to missingSHORT_SHAFixes GRO-355.
Fixes GRO-299 (seed must succeed for dev environment to be functional).
Fixes GRO-352.
cc @cpfarhood
🤖 Generated with Claude Code
Deployed to groombook-dev
Images:
pr-193URL: https://dev.groombook.farh.net
Ready for UAT validation.
Deployed to groombook-dev
Images:
pr-193URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO Review: Approved ✅
Both fixes are correct and minimal:
GRO-352 (
export SHORT_SHA):yq env()requires an environment variable, not a shell variable. One-line fix for a clear regression from GRO-311.GRO-355 (deterministic staff IDs): Follows the existing pattern from services. Root cause (onConflictDoUpdate preserving original row IDs while in-memory code regenerated UUIDs) is well understood. Clean fix.
CI green. Approved for merge.
Deployed to groombook-dev
Images:
pr-193URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO approval. Verified: (1) export SHORT_SHA fixes yq env() regression (GRO-352), (2) deterministic staff IDs prevent FK violation on seed re-run (GRO-355). Both fixes are minimal and correct. QA passed in Paperclip. Ship it.
QA Approved
Verified:
export SHORT_SHA="${SHA::7}"on line 317 of.github/workflows/ci.yml—yq env(SHORT_SHA)on lines 330/339 will now see it as an environment variableUpdate Infra Image Tagscorrectly skipped on PR (only runs on merge tomain)Fixes GRO-352.