fix: bump eventsourced/pg to v2.0.2 and harden startup error logging #851
Reference in New Issue
Block a user
Delete Branch "fix/pg-v2-startup-logging"
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?
Why
schemas is crash-looping at startup (exit 0 /
Completed, no error in logs). Same root cause as dancefinder: pg v1.19.0+ auto-runs an idempotency migration whose partial index uses a non-IMMUTABLEnow()predicate, which modern Postgres rejects (functions in index predicate must be marked IMMUTABLE), failingpg.New(). schemas was on the broken pg v1.20.0.What
1. Dependency bump (fixes the crash)
gitlab.com/unboundsoftware/eventsourced/pg/v2→ v2.0.2 (the fixed, importable release; v2.0.0/v2.0.1 lacked the required/v2module path)gitlab.com/unboundsoftware/eventsourced/eventsourced→ v1.23.0 (required by pg/v2).../pg→.../pg/v2); package stayspg, no call sites change.2. Startup error logging (diagnosability)
main()now also writes startup errors to stderr (survives the deferred OTel SDK shutdown that was swallowing them) andos.Exit(1)so the pod reports failed instead ofCompleted.Verification
go build ./...,go vet, fullgo test ./...all pass. eventsourced v1.23.0's metrics refactor is unused by schemas.Mirrors dancefinder PRs #437 (bump) + #436 (logging).