Wait for postgres docker container to be ready before running commands #3876
Labels
bug
Something isn't working
good_first_issue
Straightforward + self-contained changes, good for new contributors!
Describe the bug
When running
make setup-db
during setup, it needs to wait for the database to be running before running commands to get the postgres database in the right state.Steps To Reproduce
Run through the steps in CONTRIBUTING. The first time you run
make setup-db
there will be an error that the server connection closed unexpectedly. If you attempt to runmake integration
the tests will fail as dbtMixedCase database will not exist. Runmake setup-db
again and everything will work and integration tests will run.Expected behavior
Be able to run
make setup-db
a single time and have everything work.Screenshots and log output
If applicable, add screenshots or log output to help explain your problem.
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
The output of
python --version
:Additional context
Wait for
pg_isready
in setup_db.sh should fix this.The text was updated successfully, but these errors were encountered: