Skip to content

[BUGFIX] Wait longer for database readiness - #94

Merged
sbuerk merged 1 commit into
mainfrom
bugfix/waitfor-database-readiness
Jul 30, 2026
Merged

sbuerk merged 1 commit into
mainfrom
bugfix/waitfor-database-readiness

Conversation

@sbuerk

@sbuerk sbuerk commented Jul 30, 2026

Copy link
Copy Markdown
Member

Why

waitFor() capped the readiness poll at 11 iterations of sleep 1 — about 11
seconds. Measured against the same images, time from run -d until the port
accepts connections:

image podman docker
mysql:8.0 7.0–7.2 s 12.2–13.2 s
mariadb:10.4 7.8 s 8.2 s
postgres:10 1.3 s 1.5 s

Only mysql crosses the limit, and only under docker, whose entrypoint needs
about twice as long to initialise a fresh data directory. Since the workflows
now select docker, the functional mysql suites started aborting intermittently.
The cap is 60 s instead, which also gives mariadb a sensible margin.

The abort did not abort

kill -SIGINT -$$ relies on the SIGINT trap, and that trap is only installed
when CI is not "true". In CI the kill was a no-op, so the script carried on
and ran the test suite against a database that was not listening — reporting
dozens of Connection refused errors instead of the readiness timeout that had
actually happened. waitFor() now cleans up and exits directly.

waitFor() capped the readiness poll at 11 iterations of "sleep 1", so
roughly 11 seconds. Measured against the same images, the time from
"run -d" until the port accepts connections is:

  mysql:8.0      podman 7.0-7.2s    docker 12.2-13.2s
  mariadb:10.4   podman 7.8s        docker 8.2s
  postgres:10    podman 1.3s        docker 1.5s

Only mysql crosses that limit, and only under docker, whose entrypoint
needs about twice as long to initialise a fresh data directory. The
workflows select docker now, so the functional mysql suites began to
abort intermittently. The cap is 60 seconds instead, which also leaves
mariadb a sensible margin.

The abort also did not abort. "kill -SIGINT -$$" relies on the SIGINT
trap, and that trap is only installed when CI is not "true". In CI the
kill was a no-op, so the script carried on and ran the test suite
against a database that was not listening, which then reported dozens
of "Connection refused" errors instead of the readiness timeout that
had actually occurred. waitFor() cleans up and exits directly now.
@github-actions

Copy link
Copy Markdown

Documentation rendering

You can find files attached to the below linked Workflow Run URL (Logs).

Please note that files only stay for around 5 days!

Name Link
Commit bc9d635
Logs https://github.com/web-vision/deepl-base/actions/runs/30528272011
Documentation https://github.com/web-vision/deepl-base/actions/runs/30528272011/artifacts/8753573467

@sbuerk
sbuerk merged commit 9fc020b into main Jul 30, 2026
8 checks passed
@sbuerk
sbuerk deleted the bugfix/waitfor-database-readiness branch July 30, 2026 08:56
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.

1 participant