HOTFIX 2: mig 134 missing set_config('paliad.audit_reason', …) — paliad still offline after #130 #131
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Incident
paliad.de still offline. After #130 (commit
6f8b4ea) fixed the 3-segment code-shape violation, a NEW error surfaces on mig 134:Mig 134 UPDATEs
paliad.deadline_rules(step 4d reassigns 16 rules to the unifiedupc.apl.unifiedproceeding type). The audit trigger added in mig 079 requirespaliad.audit_reasonto be set first.Fix
Add the canonical
set_config('paliad.audit_reason', …, true)call at the top of both mig 134 up + down SQL files. Pattern from mig 127, 099, 100, 106, 110, 129 etc. — well-established.Files to edit
internal/db/migrations/134_berufung_unification.up.sql— add at the very top, before any DO block / UPDATE:internal/db/migrations/134_berufung_unification.down.sql— same pattern, with a down-flavored reason string:Acceptance
grep -nE "set_config\\('paliad\\.audit_reason'" internal/db/migrations/134_berufung_unification.up.sql internal/db/migrations/134_berufung_unification.down.sqlreturns 2 hits (one per file).go build ./...clean (no real change to build).Why
The
paliad.audit_reasonmechanism (added in mig 079) records why every deadline_rules mutation happened. Migrations that UPDATE the table must opt in via set_config. Cronus's mig 134 missed this — same root cause as #130 (didn't grep existing constraints/triggers before writing the migration).Priority: prod still down.
Verified fixed — and the audit row it feeds was actually written
What I ran — repo reads plus read-only queries against prod.
The
set_configcall exists in both files134_berufung_unification.up.sqllines 33-36, under a-- 0. Audit reasonheader, before any DO block or UPDATE:134_berufung_unification.down.sqllines 17-20 carries the down-flavoured twin, exactly as specified.A note on acceptance 1, because it will mislead the next person
The acceptance criterion as written —
returns zero hits, and the fix is correct anyway. The call is formatted across four lines, so
set_config(and'paliad.audit_reason'are never on the same line. I ran that exact grep first and it told me the fix was missing. A pattern that only matches the single-line form cannot verify a multi-line one.grep -n "paliad.audit_reason"on both files is the check that works.The audit row was written — this is the part that proves it ran
The call existing proves the code is there; it does not prove the trigger was satisfied. On prod:
32 rows in
paliad.deadline_rule_auditcarrying mig 134's exact reason string, first written at 13:21:27.4861+00 — byte-identical toapplied_migrations.applied_atfor version 134. The UPDATE ran, the trigger passed, and the audit history records why.What I could not verify
The post-deploy container status in acceptance 4. No shell on mlake. Prod is at migration head 211 and serving, so the outage is long over.
Verdict: resolved. Not closing — that is m's.