feat: add --wait-interval flag and DBMATE_WAIT_INTERVAL env var - #803
Merged
Merged
Conversation
somaz94
marked this pull request as ready for review
June 23, 2026 01:36
Contributor
Author
|
Gentle nudge, @amacneil — it's been a few weeks. This adds a --wait-interval flag / DBMATE_WAIT_INTERVAL env for the wait command; it's opt-in and defaults preserve the current behavior. Happy to adjust anything. Thanks for dbmate! |
Contributor
Author
|
Open since June with no review. Is a configurable wait interval ( |
…flag * upstream/main: (29 commits) fix: redact full password when it contains @ sign (#785) Replace hardcoded hostname in ping tests (#705) Bump google.golang.org/grpc from 1.83.1 to 1.83.2 (#839) Bump js-yaml from 4.3.0 to 4.3.2 in /typescript (#836) fix: bump golang.org/x/crypto to v0.55.0 (CVE-2026-56854) (#833) Bump @humanfs/node from 0.16.6 to 0.16.8 in /typescript (#832) Bump google.golang.org/grpc from 1.82.1 to 1.83.1 (#831) Bump brace-expansion from 1.1.14 to 1.1.18 in /typescript (#830) Replace broken Homebrew bump action with brew bump-formula-pr (#814) Bump golang from 1.26.5 to 1.26.6 (#826) fix: bump vulnerable indirect Go dependencies (#825) Document environment variable usage in README (#500) (#837) v2.35.1 (#829) v2.35.0 (#822) Bump google.golang.org/grpc from 1.80.0 to 1.82.1 (#819) Bump actions/setup-node from 6 to 7 (#815) Bump actions/setup-go from 6 to 7 (#818) fix: remove extra bound argument in BigQuery InsertMigration (#817) fix: correct typos in README and source comment (#809) Bumps bump-homebrew-formula-action to v4.1 (#813) ...
dossy
pushed a commit
that referenced
this pull request
Sep 15, 2026
When `dbmate up --wait` runs before the database is ready, go-sql-driver logs its own error lines straight to stderr, so the console fills up with `[mysql] packets.go:37: unexpected EOF` before the "Waiting for database" dots even show up. dbmate already reports the real connection error itself, and the other drivers don't spew this, so the driver's logging is just noise here. This sets a `NopLogger` on the mysql config we build for our own connections. It stays scoped to dbmate's connections rather than touching the driver's global logger, so it won't silence go-sql-driver for anyone using dbmate as a library. Part of #516 (the console spam that was asked to be fixed first). The `--wait-interval` flag from that issue is already covered by #803, so I kept this separate. Co-authored-by: Chris (ChrisJr404) <11917633+ChrisJr404@users.noreply.github.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
--wait-intervalCLI flag andDBMATE_WAIT_INTERVALenv var to configure the delay between connection attempts for--wait. TheWaitIntervalfield is already exposed to Go API users; this plumbs it through the CLI, mirroring the existing--wait-timeout/DBMATE_WAIT_TIMEOUT.Validation (local, macOS):
go build ./...andgo vet ./...passgolangci-lint run: 0 issuesgo testfor the main package passes, including a newTestConfigureDB_WaitInterval(default / env / flag-overrides-env)dbmate --helpshows:--wait-interval value ... (default: 1s) [$DBMATE_WAIT_INTERVAL]related: #516