Repository navigation
Wait until the dev database accepts connections in wasp db start - #5285
Conversation
@wasp/spec
@wasp/cli
@wasp/cli-darwin-arm64-unknown
@wasp/cli-linux-arm64-glibc
@wasp/cli-linux-x64-glibc
@wasp/cli-linux-x64-musl
commit: |
122bdae to
c021ccd
Compare
There was a problem hiding this comment.
Important
A clean database exit during startup can still trigger the readiness callback and print a false “ready” message.
Reviewed changes: Reviewed the readiness probe, database-session lifetime, and updated E2E synchronization.
- Readiness polling: Uses container-local TCP
pg_isreadychecks to wait past PostgreSQL initialization. - Session lifetime: Extracts
withPostgresDevDband brackets an asynchronous database job while racing readiness against process exit. - E2E synchronization: Waits for Wasp's readiness message before exercising migrations and existing shutdown checks.
Container-backed E2E tests could not be run locally because Docker reported: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
gpt-6.1-sol | 𝕏
c021ccd to
73a1e71
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: Reviewed the changes since the previous Pullfrog review at c021ccd, focusing on startup failures and readiness-check results.
- Prevented false readiness: Restricted the callback to successful readiness checks and made every pre-readiness container exit fail startup, including clean exits.
- Handled missing probes: Added an explicit failure when
docker execreports that the readiness command is missing, rather than retrying indefinitely. - Added regression coverage: Added E2E assertions for an immediately exiting
alpinecontainer and annginx:alpinecontainer withoutpg_isready.
Container-backed E2E tests could not be run here: docker info reported Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
gpt-6.1-sol | 𝕏
|
This pull request is now stale. Next steps if the PR is still relevant, and you are able to devote time to it:
If no action is taken, this PR will be automatically closed in 7 days. |
73a1e71 to
8051a2a
Compare
8051a2a to
274b850
Compare

Description
What it says on the tin, we use
pg_isreadyto make sure the database is up before outputting is ready. Not a huge change, but this sets up for using it in other commands that need to wait for database being up before starting.Agreement
wasp start#4914 (comment)Type of change
Checklist
I tested my change in a Wasp app to verify that it works as intended.
🧪 Tests and apps:
examples/kitchen-sink/e2e-tests.waspc/data/Cli/templates, as needed.examples/, as needed.examples/tutorials) I updated the tutorial in the docs (and vice versa).📜 Documentation:
web/docs/.🆕 Changelog: (if change is more than just code/docs improvement)
waspc/ChangeLog.mdwith a user-friendly description of the change.web/docs/migration-guides/.versioninwaspc/waspc.cabalto reflect the changes I introduced.