amacneil/dbmate

Add `--wait-interval` and `$DBMATE_WAIT_INTERVAL` to make wait interval configurable at runtime

Open

#516 geöffnet am 24. Jan. 2024

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (349 Forks)github user discovery
feature requestgood first issuehelp wantedneeds work

Repository-Metriken

Stars
 (6.937 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Description

When using the --wait flag and dbmate up is run before the DB is ready, the logs are flooded with this message:

[mysql] 2024/01/24 19:58:12 packets.go:37: unexpected EOF

Eventually it stops when the DB is ready and it can run migrations:

[mysql] 2024/01/24 19:58:12 packets.go:37: unexpected EOF
[mysql] 2024/01/24 19:58:12 packets.go:37: unexpected EOF
Waiting for database.....................................................................................................................
Migrations complete.
Connecting to 127.0.0.1:15020 (127.0.0.1:15020)
  • Version: 2.11
  • Database: mysql
  • Operating System: Linux (official Docker container)

Steps To Reproduce Set up a K8S job that will run the dbmate container against a K8S mysql pod. Restart the mysql pod then kick off the dbmate job with --wait flag. Observe the log messages.

Expected Behavior I would expect to see the message Waiting for database and a . for each time it attempts connection until it succeeds.

Contributor Guide