fix(ci): wait for DBs before starting Temporal #21510
Merged
+8
−0
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.
Problem
Temporal has been timing out in CI (#21489) - it appears that this may be due to the fact that Temporal is starting before the Postgres database is fully started itself, and so when the Temporal server starts to initialize its schema, it fails.
Changes
This PR adds the
depends_on
for both Postgres and Elasticsearch, so that Temporal is started after - this matches the upstreamdocker-compose.yml
too: https://github.com/temporalio/docker-compose/blob/4a2408b1ae75491295ae66bba21bf86918d74f8b/docker-compose-postgres-opensearch.yml#L39-L43. This way, Temporal should wait until the Postgres server is online.I also added a change so that
docker compose logs
are printed on workflow failure, for better debugging - in the case of the Temporal timeouts, it did actually print an error about the database not being ready in the compose logs.Does this work well for both Cloud and self-hosted?
No impact.
How did you test this code?
Tested by running several of these workflows on our fork.