Skip to content

GHA tests that depend on Postgres fail intermittently: #25757

Discussion options

You must be logged in to vote

This seems to be resolved (knock on wood).

What ended up working was using depends_on together with condition so the postgres health check was actually getting monitored by the dependent service, e.g.:

    depends_on:
      db:
        condition: service_healthy

See SO post here: django - psql not found in script for trying to control startup and shutdown order in Docker Compose - Stack Overflow

Note that this isn’t officially supported for docker compose v3, but it seems to be unofficially supported. My editor gives me a warning on the condition statement. It works fine when running in Github, so I’m content for now.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants