Repository navigation
ate-setup: refuse to point an external-database install at the bundled one - #2588
Merged
Dmitry Berkovich (dberkov) merged 2 commits intoOct 13, 2026
Merged
Dmitry Berkovich (dberkov) merged 2 commits into
Dmitry Berkovich (dberkov) merged 2 commits into
Conversation
Steven Shriver (stshrive)
approved these changes
Oct 13, 2026
Steven Shriver (stshrive)
left a comment
Collaborator
There was a problem hiding this comment.
LGTM.
This is an interesting edge case. Do all secret configurations potentially expose this same problem though?
An install on an external PostgreSQL can give ate-api-server a separate owner login with ATE_API_POSTGRES_OWNER_CONNECTION_STRING. Like the read-write string, the install record leaves it out, so every run has to be given it again. A run that set only the read-write string used it for the owner too, and silently replaced the owner login in the Secret. ate-setup now stops in that case and names the missing variable. Installs with one login are unchanged, and so are moves off the bundled database, whose owner login is ate-setup's own.
Member
Author
You are right, there's also |
Dmitry Berkovich (dberkov)
approved these changes
Oct 13, 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.
ate-setupdoesn't remember an external PostgreSQL's connection string between runs.The install record leaves it out intentionally because it can carry a password. If a run forgets
ATE_API_POSTGRES_READ_WRITE_CONNECTION_STRING,ate-setupassumes the bundled database and writes its address into the API server's Secret:deploy apiserverfails waiting for a bundled PostgreSQL that doesn't exist, and the next API server restart can't reach the database.deploy ate-systemstarts an empty bundled PostgreSQL and moves the API server onto it, so every actor looks gone.Now, if the run names no database and the Secret already holds an address that isn't the bundled one,
ate-setupstops before it changes the database settings and names the missing variable.A fresh installs, bundled installs and Cloud SQL work as before, and so does leaving Cloud SQL with an empty
ATE_API_POSTGRES_CLOUDSQL_INSTANCE.A second commit does the same for
ATE_API_POSTGRES_OWNER_CONNECTION_STRING. If the install uses a separate owner login and a run gives only the read-write string, ate-setup stops instead of replacing the owner login.Found while reviewing the upgrade runbook (#1844).
Part of #1686