argoyle 3f22773f58
schemas / vulnerabilities (push) Successful in 1m43s
schemas / check (push) Successful in 2m25s
schemas / check-release (push) Successful in 2m38s
Release / release (push) Failing after 49s
pre-commit / pre-commit (push) Successful in 6m30s
schemas / build (push) Successful in 5m8s
schemas / deploy-prod (push) Successful in 1m37s
fix: bump eventsourced/pg to v2.0.2 and harden startup error logging (#851)
## 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-IMMUTABLE `now()` predicate, which modern Postgres rejects (`functions in index predicate must be marked IMMUTABLE`), failing `pg.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 `/v2` module path)
- `gitlab.com/unboundsoftware/eventsourced/eventsourced` → **v1.23.0** (required by pg/v2)
- Only the import path changes (`.../pg` → `.../pg/v2`); package stays `pg`, 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) and `os.Exit(1)` so the pod reports failed instead of `Completed`.

## Verification

`go build ./...`, `go vet`, full `go test ./...` all pass. eventsourced v1.23.0's metrics refactor is unused by schemas.

Mirrors dancefinder PRs #437 (bump) + #436 (logging).

Reviewed-on: #851
2026-05-25 20:45:22 +00:00
S
Description
No description provided
4.5 MiB
v0.9.7 Latest
2026-05-14 07:31:14 +00:00
Languages
Go 99.1%
Dockerfile 0.9%