You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(docker): bump golang-migrate in Dockerfile.test to v4.19.1 #45
Discovered while reviewing LeanerCloud/cloud-commitments-cli#1240 (which aligned the main Dockerfile + CI to golang-migrate v4.19.1). Dockerfile.test still references v4.17.0, a version drift that can cause migration-behavior differences between the E2E test image and production.
Bump Dockerfile.test to v4.19.1 with the verified checksums:
Verification sweep against main (101f099fb) on 2026-07-27 finds the premise of this issue no longer exists on main.
Dockerfile.test no longer installs golang-migrate at all; it became a minimal stdlib-only Go test-runner image, so there is no golang-migrate version left to bump.
Evidence: commit 877653d38; Dockerfile.test.
Recommending close as obsolete, not as fixed.
Reviewed commit: be11bdcb5. Note: origin/main moved to 3e9660d06 during the review; re-verify against current main before changing code, since a finding may have been fixed or moved.
Dockerfile.test is not the only file left behind by LeanerCloud/cloud-commitments-cli#1240. Dockerfile.dev has the same drift, so both should move in one change rather than leaving a third round of this.
Where
Dockerfile.dev:29 - golang-migratev4.17.0, with its own SHA256 pair at :25-27
Everything else is already on v4.19.1: Dockerfile:49, .github/workflows/ci.yml:164, .github/workflows/database-migration.yml:185,261,328, Makefile:18
What
The hot-reload dev container applies migrations with a migrate binary two minors older than production. Dockerfile.dev:7 explicitly instructs:
Keep this digest in sync with the builder stage in Dockerfile
for the base image, and the base image did stay in sync; the migrate pin drifted anyway, because nothing checks it.
Failure scenario
A migration that relies on a feature or DO-block behaviour introduced between v4.17 and v4.19 applies cleanly in production and fails, or applies differently, in the developer's container. The developer's local run is the cheapest place to catch a migration defect, and it is the one environment running the oldest tool - so the discrepancy is found after the migration has already reached an environment where it costs something to fix.
Fix direction
Bump Dockerfile.dev:29 to v4.19.1 with the matching checksums (the same pair this issue already records for Dockerfile.test, since both download the same release artefacts):
Verify the arch mapping against the release before committing rather than copying blind.
Worth noting for the same PR: there is no automation that would have caught either drift. The repo has no dependabot.yml or renovate.json, despite Dockerfile:17 and Dockerfile.dev:6 both saying such a config "can automate this if desired". That is filed as a MEDIUM in the grouped chore(ci) issue from this review.
The fix for this (Dockerfile.dev building migrate from source with the pgx5 tag, matching the production Dockerfile) is in #1210, which now closes this issue too.
Activity
cristim commentedon Jul 27, 2026
Verification sweep against
main(101f099fb) on 2026-07-27 finds the premise of this issue no longer exists on main.Dockerfile.test no longer installs golang-migrate at all; it became a minimal stdlib-only Go test-runner image, so there is no golang-migrate version left to bump.
Evidence: commit 877653d38; Dockerfile.test.
Recommending close as obsolete, not as fixed.
cristim commentedon Jul 28, 2026
Reviewed commit:
be11bdcb5. Note:origin/mainmoved to3e9660d06during the review; re-verify against currentmainbefore changing code, since a finding may have been fixed or moved.Dockerfile.testis not the only file left behind by LeanerCloud/cloud-commitments-cli#1240.Dockerfile.devhas the same drift, so both should move in one change rather than leaving a third round of this.Where
Dockerfile.dev:29-golang-migratev4.17.0, with its own SHA256 pair at:25-27Dockerfile:49,.github/workflows/ci.yml:164,.github/workflows/database-migration.yml:185,261,328,Makefile:18What
The hot-reload dev container applies migrations with a migrate binary two minors older than production.
Dockerfile.dev:7explicitly instructs:for the base image, and the base image did stay in sync; the migrate pin drifted anyway, because nothing checks it.
Failure scenario
A migration that relies on a feature or
DO-block behaviour introduced between v4.17 and v4.19 applies cleanly in production and fails, or applies differently, in the developer's container. The developer's local run is the cheapest place to catch a migration defect, and it is the one environment running the oldest tool - so the discrepancy is found after the migration has already reached an environment where it costs something to fix.Fix direction
Bump
Dockerfile.dev:29to v4.19.1 with the matching checksums (the same pair this issue already records forDockerfile.test, since both download the same release artefacts):2fea2455c0f3f07cc3f4b98471c951ad1a716059574b20b6416bd1e9058751c52ac648fbd1b127b69ab5a7b33cf96212178f71e22379fc50573630c6f4c7ce18Verify the arch mapping against the release before committing rather than copying blind.
Worth noting for the same PR: there is no automation that would have caught either drift. The repo has no
dependabot.ymlorrenovate.json, despiteDockerfile:17andDockerfile.dev:6both saying such a config "can automate this if desired". That is filed as a MEDIUM in the groupedchore(ci)issue from this review.IAmJSD commentedon Oct 22, 2026
Claiming: working on this
IAmJSD commentedon Oct 22, 2026
The fix for this (Dockerfile.dev building migrate from source with the pgx5 tag, matching the production Dockerfile) is in #1210, which now closes this issue too.