chore: scaffold and verify on PostgreSQL 18 - #164
Conversation
init generated a stack pinned to postgres:17 while the verify harness ran postgres:16, so the harness was never certifying the major a fresh scaffold got. Both move to postgres:18 and the drift is gone. No existing project is affected: the image is written into each scaffold's own docker-compose.yml at generation time, so a project keeps the major it was scaffolded with. The harness starts every run with `down -v`, so its volume is always fresh and the bump needs no migration there either.
Org-wide postgres inventorySearched the org rather than guessing. Three tiers, and only the first is low-risk like this PR: Tier 1 — generated or ephemeral (safe, same reasoning as this PR)
Template compose files are copied into new projects, so bumping them only affects future scaffolds. CI and test-harness containers are per-run. These are two majors behind and, notably, the templates are what Tier 2 — long-lived local dev volumes (needs a note, not just a bump)
These are checked-out repos where developers have a running volume. Bumping the major means the container refuses to start against the existing data directory: Tier 3 — production, do not sweep
Aurora PostgreSQL, with the concrete Docs referencing versions in passing ( Happy to take tier 1 next, since it is the same argument as this PR and closes the gap between the CLI and the templates it scaffolds. |
Rollout loggedFiled a tracking issue in every repo with a postgres pin that is not 18. Verified each pin by
Each issue states its own risk rather than repeating a generic bump. The compose files that back a
Not filed: the Aurora pins in |
Follow-up to the version audit on #146, where I flagged
postgres:17as a major behind and said it wanted its own PR.The drift
Two pins had come apart:
src/core/images.ts(whatinitscaffolds)postgres:17postgres:18verify/docker-compose.verify.yml(the harness)postgres:16postgres:18The harness was certifying a different major than a fresh scaffold actually got, which is the part worth fixing regardless of which version wins.
Blast radius, corrected
I was more alarmist about this on #146 than it deserved. I said it "breaks the data directory for anyone with an existing volume" — that is wrong for this repo, and I checked before writing the bump:
POSTGRES_IMAGEis interpolated into each scaffold's owndocker-compose.ymlat generation time (src/generators/docker/docker.ts). An existing project keeps the major it was scaffolded with; nothing reaches back and changes it.compose down -vat the start of every run, so its volume is always fresh.So this reaches new scaffolds on a new volume, and nothing else. Upgrading an existing project stays a deliberate act (change the image, dump and restore), and the changeset says so.
Checks
npm run buildandnpm testpass (815 passed, 4 skipped). Scaffolded a project from the built CLI and confirmed its generated compose saysimage: postgres:18. Smoke-tested the image itself:PostgreSQL 18.4 (Debian 18.4-1.pgdg13+1)starts and answers queries.The
verify / verifyCI job is the real test here, since it stands the whole stack up on 18. I did not run it locally this time because the ports were in use.Not in this PR
The org has other postgres pins, inventoried in a comment below. They are separate repos with separate risk (several have long-lived local dev volumes, and the Aurora pins are production), so they want their own PRs rather than being swept in here.