Closed benjimin closed 2 years ago
Wondering if it could be a conflict with the Postgres provided by the GitHub Actions environment? (Apparently there was a version bump in early october?)
It seems like the CI broke sometime between roughly Nov 16th and 25th.
Incidentally, the Nov 22 update to the virtual environment used by github actions is claiming to have bumped the version of docker compose
(not docker-compose
) from 2.0 to 2.1 (and docker buildx
from 0.6 to 0.7). It also bumped postgres from 14.0 to 14.1, with further postgres install script changes (using a toolset rather than directly installing the client).
The offending code seems to be, more or less:
docker-compose up -d
docker-compose exec -T -u postgres postgres psql < dump.sql
which now evokes psql: could not connect to server
etc (but previously succeeded).
The docker-compose.yml
contains:
services:
postgres:
image: postgres:11.5-alpine
ports:
- "127.0.0.1:5432:5432"
Seems the problem was a race condition, that the runner was trying to use the psql
client before the postgres service was ready (i.e. when the postgres container had only just started).
Tests failing in CI, for runs that previously succeeded and that still succeed locally. (Also impacts #134.) Involves populating the sample database, i.e. in
setup-db.sh
.One example run:
Another example run:
Note, the docker compose file appears to pin the postgres image version.