Skip to content

feat: add --wait-interval flag and DBMATE_WAIT_INTERVAL env var - #803

Merged
dossy merged 3 commits into
amacneil:mainfrom
somaz94:feat/wait-interval-flag
Sep 15, 2026
Merged

dossy merged 3 commits into
amacneil:mainfrom
somaz94:feat/wait-interval-flag

Conversation

@somaz94

@somaz94 somaz94 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Adds a --wait-interval CLI flag and DBMATE_WAIT_INTERVAL env var to configure the delay between connection attempts for --wait. The WaitInterval field 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 ./... and go vet ./... pass
  • golangci-lint run: 0 issues
  • go test for the main package passes, including a new TestConfigureDB_WaitInterval (default / env / flag-overrides-env)
  • dbmate --help shows: --wait-interval value ... (default: 1s) [$DBMATE_WAIT_INTERVAL]

related: #516

@somaz94

somaz94 commented Jul 20, 2026

Copy link
Copy Markdown
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!

@somaz94

somaz94 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Open since June with no review. Is a configurable wait interval (--wait-interval / DBMATE_WAIT_INTERVAL) something you want in dbmate? Happy to close it if not, otherwise it is green and mergeable.

…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
dossy merged commit 05531f9 into amacneil:main Sep 15, 2026
10 checks passed
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>
@dossy dossy mentioned this pull request Sep 19, 2026
dossy added a commit that referenced this pull request Sep 19, 2026
Changes since v2.35.1:

* #835
* #803
* #834
* #827
* #785
* #833
* #825
* #823
* #837
* #705
* #814
* #840
* #826
* #841
* #839, #831
* #836
* #832
* #830
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.

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

2 participants