Move the sandbox postgres volume to /var/lib/postgresql and bump the image to 18-alpine - #89
Merged
Merged
Conversation
From 18 the official image stores the cluster under a major-version directory and refuses to start when it finds a mount at the pre-18 path, so the E2E job failed on every attempt to bump the tag. The tag and the mount path cannot be split: 17 declares the child path as a volume of its own, which would shadow a parent mount with an anonymous volume.
178inaba
marked this pull request as ready for review
September 2, 2026 08:55
Merged
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The E2E job went red on every attempt to move the sandbox PostgreSQL to
postgres:18-alpine(#87, Dependabot): thepostgrescontainer exited 1 duringscripts/redash-up.sh, before Redash was ever started.The cause was not the seed or the data in the volume — it was where
compose.yamlmounted it. From 18 the official image stores the cluster under a major-version directory (/var/lib/postgresql/18/docker) and declaresVOLUME /var/lib/postgresql, and its entrypoint refuses to start when it finds a mount at the pre-18 path:It reproduces with an empty volume, so a fresh CI runner hits it too (docker-library/postgres#1259). The sandbox is the only thing standing between a Redash-side contract change and a green CI, so the E2E job has to be able to run on a supported PostgreSQL; staying on 17 only defers the same break.
What
compose.yaml'spostgresservice moves topostgres:18-alpineand mounts its named volumeredash-postgresat/var/lib/postgresql. The seed bind mount, the healthcheck, and the pgautoupgrade rationale above the service are untouched, and noPGDATAis set — the parent mount is the layout the image's own entrypoint prescribes for 18+.The two changes cannot be split, which is why the volume entry carries a comment saying so. Moving the mount first, on 17, was tried and rejected:
postgres:17-alpinedeclaresVOLUME /var/lib/postgresql/data, so a named mount on the parent is shadowed by an anonymous volume holding the actual cluster. The server would still start andSHOW data_directorywould still answer/var/lib/postgresql/data, but--resetand the README'sdocker volume rm rdsh-redash-postgreswould silently stop removing the database, and every teardown would orphan a volume. Without the comment the path reads like a typo and gets "tidied" back.Deliberately not changed
--reset, and a 17-era volume remounted under 18 fails loudly with the error above rather than initialising a fresh cluster over it — so the existing remedy needs no rewording.pgautoupgrade/ in-placepg_upgrade.compose.yamlalready records that plainpostgresis deliberate because--resetreplaces an in-place major upgrade.scripts/redash-up.sh,.github/workflows/ci.yml,scripts/redash-seed.sql,e2e/.--resetremoves the volume by its fixed name, which does not change; CI starts on an empty volume; the seed produces the same rows under 18.This supersedes #87. Dependabot normally closes its PR once an equivalent bump lands on main; if it does not, #87 should be closed by hand.
Verification
Run against a machine that already held a 17-era
rdsh-redash-postgresvolume:docker compose --profile redash config—postgres:18-alpine, exactly one named-volume mount, at/var/lib/postgresql.scripts/redash-up.sh --resetbrought the sandbox up, anddocker inspect rdsh-postgres-1listed the named volumerdsh-redash-postgresand no anonymous volume.rdsh run --data-source sandbox "SELECT count(*) FROM signups"returned 40.go test -tags e2e -count=1 ./e2e/passed, as didgo test ./...anddocker compose run --rm lint.Closes #88