fix: suppress auto-push/backup warnings in quiet and JSON modes#2822
Merged
maphew merged 1 commit intosteveyegge:mainfrom Mar 26, 2026
Merged
fix: suppress auto-push/backup warnings in quiet and JSON modes#2822maphew merged 1 commit intosteveyegge:mainfrom
maphew merged 1 commit intosteveyegge:mainfrom
Conversation
Auto-push and auto-backup warning messages (e.g., 'Warning: dolt auto-push failed') were always printed to stderr regardless of output mode. This creates noise in agent workflows using --quiet or --json, where agents may misinterpret warnings as errors. Now these warnings are: - Suppressed in --quiet mode (errors-only output) - Suppressed in --json mode (clean machine-readable output) - Always logged via debug.Logf for troubleshooting with BD_DEBUG=1 Closes #9 Co-authored-by: Copilot <[email protected]>
Collaborator
|
Hygiene: Exemplary. Conventional commit title, thorough problem/fix/backward-compat description, references upstream issue. Value: Real UX bug for agent workflows. Minimal, surgical change. Thanks @harry-miller-trimble! |
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.
Problem
Auto-push and auto-backup warning messages (e.g.,
Warning: dolt auto-push failed) were always printed to stderr, even when using--quietor--json. In agent workflows with frequent writes, these warnings create noise that agents may misinterpret as errors.Fix
Suppress warning messages from
maybeAutoPushandmaybeAutoBackupwhen--quietor--jsonmode is active. Errors are still logged viadebug.Logffor troubleshooting withBD_DEBUG=1.Affected messages:
Warning: dolt auto-push failed: <err>Warning: auto-backup failed: <err>Warning: backup git push failed: <err>Note: The throttle messages (
dolt auto-push: throttled...,backup: throttled...) were already debug-only — they only appear withBD_DEBUG=1or--verbose.Changes
cmd/bd/dolt_autopush.go: Guard push failure warning with!isQuiet() && !jsonOutputcmd/bd/backup_auto.go: Guard backup failure + git push warnings similarlyBackward Compatibility
--quiet/--json: warnings suppressed (new behavior)BD_DEBUG=1: all messages still visible viadebug.LogfCloses harry-miller-trimble#9