fix(helm): make fresh installs work — valid db tag, working init SQL, no core-schema pre-creation - #1
Draft
dnplkndll wants to merge 3 commits into
Draft
fix(helm): make fresh installs work — valid db tag, working init SQL, no core-schema pre-creation#1dnplkndll wants to merge 3 commits into
dnplkndll wants to merge 3 commits into
Conversation
dnplkndll
force-pushed
the
fix/helm-fresh-install
branch
2 times, most recently
from
July 26, 2026 17:10
5d926e0 to
e97409e
Compare
twenty-postgres-spilo:3.3-p2 was removed from Docker Hub; default installs fail at ErrImagePull before anything else runs. Pin the newest published tag. (Replacing spilo with postgres:16 per twentyhq#10883 is proposed separately.)
…re-creating core schema psql interpolates :'var' only in plain stdin statements — not in -c strings and not inside dollar-quoted DO bodies — so none of the previous init SQL ever ran. Installs only appeared to work because spilo images pre-create the database and app user with an image-baked password, which does not match the chart-generated secret: fresh installs crash-loop on "password authentication failed". The rewrite uses one heredoc with \gexec conditionals, always re-syncs the app-user password, and replaces schema pre-creation with database/public ownership: the entrypoint treats an existing "core" schema as "already migrated", so creating it here made every fresh install skip base migrations and boot against an empty database.
dnplkndll
force-pushed
the
fix/helm-fresh-install
branch
from
July 26, 2026 17:20
e97409e to
61ddc9e
Compare
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(helm): make fresh installs work — valid db tag, working init SQL, no core-schema pre-creationFixes #TBD (upstream issue to be filed on approval).
What was broken
twenty-postgres-spilo:3.3-p2is gone from Docker Hub→ db pod
ErrImagePullwith default values.:'var'only in plain stdinstatements, not in
-cstrings or dollar-quotedDObodies; the init usedboth, so all of its SQL errored. Installs relied on spilo pre-creating the
database and app user with an image-baked password that doesn't match the
chart secret → fresh installs crash-loop on
password authentication failed.coredefeats the entrypoint'sfresh-database check, so base migrations were skipped and the server booted
"healthy" against an empty database (
signUp→relation "core.user" does not exist).Changes
v0.43.5(newest published tag; a floatinglatestinto a deprecated repo can drift silently). Replacing spilo with
postgres:16per [MISC] Deprecates
Spilotwentyhq/twenty#10883 is proposed separately; the rewritten init works with either image.ON_ERROR_STOP=1,format(...) \gexecfor theconditional CREATEs, unconditional
ALTER USER … PASSWORDto re-sync thesecret, and database/
publicownership transfer instead of schemapre-creation + grants (migrations create schemas themselves, correctly owned).
notMatchRegex: CREATE SCHEMAsothe migration-skip bug cannot return. 54/54 pass.
Verification (kind v0.32, transcripts below)
ErrImagePull; live tag →CrashLoopBackOffonapp-user auth.
corepopulated (53 tables), signUpreturns a token — no manual intervention.
Transcripts
Before — default values (dead tag)
Before — live tag, stock init (auth crash-loop)
After — this branch, default values