Fix Dolt backend init/daemon/doctor; prevent accidental SQLite artifacts; add integration tests; clean up lint (#1218)
* /{cmd,internal}: get dolt backend init working and allow issue creation
* /{website,internal,docs,cmd}: integration tests and more split backend fixes
* /{cmd,internal}: fix lint issues
* /cmd/bd/doctor/integrity.go: fix unable to query issues bug with dolt backend
* /cmd/bd/daemon.go: remove debug logging
This commit is contained in:
@@ -40,8 +40,18 @@ Examples:
|
||||
logLevel, _ := cmd.Flags().GetString("log-level")
|
||||
logJSON, _ := cmd.Flags().GetBool("log-json")
|
||||
|
||||
// Load auto-commit/push/pull defaults from env vars, config, or sync-branch
|
||||
autoCommit, autoPush, autoPull = loadDaemonAutoSettings(cmd, autoCommit, autoPush, autoPull)
|
||||
// NOTE: Only load daemon auto-settings from the database in foreground mode.
|
||||
//
|
||||
// In background mode, `bd daemon start` spawns a child process to run the
|
||||
// daemon loop. Opening the database here in the parent process can briefly
|
||||
// hold Dolt's LOCK file long enough for the child to time out and fall back
|
||||
// to read-only mode (100ms lock timeout), which can break startup.
|
||||
//
|
||||
// In background mode, auto-settings are loaded in the actual daemon process
|
||||
// (the BD_DAEMON_FOREGROUND=1 child spawned by startDaemon).
|
||||
if foreground {
|
||||
autoCommit, autoPush, autoPull = loadDaemonAutoSettings(cmd, autoCommit, autoPush, autoPull)
|
||||
}
|
||||
|
||||
if interval <= 0 {
|
||||
fmt.Fprintf(os.Stderr, "Error: interval must be positive (got %v)\n", interval)
|
||||
|
||||
Reference in New Issue
Block a user