Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): wait for DBs before starting Temporal #21510

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

jacobwgillespie
Copy link
Contributor

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 upstream docker-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.

Copy link
Contributor

@tomasfarias tomasfarias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for the investigation + PR!

Maybe postgres was quicker to boot up before hence why this hasn't been an issue in the past 🤔 Anyways, this is a good change all around, and works regardless of which service is faster.

@tomasfarias tomasfarias merged commit eaec7f2 into PostHog:master Apr 12, 2024
95 of 97 checks passed
@jacobwgillespie jacobwgillespie deleted the temporal-dependency branch April 12, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants