fix(docker): distinguish skipped vs completed migrations in entrypoint log - #2
Draft
dnplkndll wants to merge 1 commit into
Draft
fix(docker): distinguish skipped vs completed migrations in entrypoint log#2dnplkndll wants to merge 1 commit into
dnplkndll wants to merge 1 commit into
Conversation
…t log The entrypoint printed "Successfully migrated DB!" unconditionally — even when it skipped database:init:prod because the "core" schema already existed. When init is skipped on a database that is actually empty (e.g. something pre-created the schema), the log claims success while the server boots against an unmigrated database, which makes the failure very hard to diagnose. Log the two paths distinctly instead.
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.
Title:
fix(docker): distinguish skipped vs completed migrations in entrypoint logRelated to #TBD (upstream issue to be filed on approval; companion to the helm init fix).
Problem
entrypoint.shprintsSuccessfully migrated DB!unconditionally — includingwhen it skipped
database:init:prodbecause thecoreschema alreadyexisted. When something pre-creates that schema on an otherwise-empty database
(as the helm chart's init container did until the companion PR), the log claims
success while the server boots against an unmigrated database and every
workspace query fails with
relation "core.user" does not exist. The log lineactively points operators away from the real cause.
Change
Track whether init ran and log the two paths distinctly:
Database initialized and migrated.Base schema already present - skipping database init (running delta upgrades only).…Delta upgrades applied (base schema was already present).No behavior change — logging only.
Verification
Docker compose boot transcripts: fresh volume shows the init path; restart
shows the skip path. [transcripts]
Logic verification (stubbed harness, both paths)