Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
### Notable Changes

### CLI
* Show a once-per-day notice after a command when a newer CLI release is available, with a link to the release and the upgrade command for the detected install method. Suppressed for non-interactive/CI runs, JSON output, the Databricks Runtime, and development builds, and can be disabled with `DATABRICKS_CLI_DISABLE_UPDATE_CHECK` ([#5470](https://github.com/databricks/cli/pull/5470)).
* Improved error messages for `ssh connect`: when an SSH connection attempt fails, the client now fetches and prints the server's recent error logs ([#5555](https://github.com/databricks/cli/pull/5555)).
* Increase the SSH server startup timeout from 10 to 45 minutes when a GPU accelerator is requested via `databricks ssh connect --accelerator` ([#5569](https://github.com/databricks/cli/pull/5569)).

Expand Down
12 changes: 0 additions & 12 deletions cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/databricks/cli/libs/log"
"github.com/databricks/cli/libs/telemetry"
"github.com/databricks/cli/libs/telemetry/protos"
"github.com/databricks/cli/libs/versioncheck"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -82,11 +81,6 @@ func New(ctx context.Context) *cobra.Command {
ctx = withInteractiveModeInUserAgent(ctx)
ctx = InjectTestPidToUserAgent(ctx)
cmd.SetContext(ctx)

// Refresh the latest-version cache in the background (no-op when
// suppressed). The result is shown by [versioncheck.Notice] after the
// command completes, so this never blocks the command.
versioncheck.StartBackgroundRefresh(ctx, cmd)
return nil
}

Expand Down Expand Up @@ -204,12 +198,6 @@ Stack Trace:
log.Infof(ctx, "telemetry upload failed: %s", telemetryErr)
}

// Print a "new version available" notice if one is due (no-op when
// suppressed, on error, or when nothing is cached yet).
if msg := versioncheck.Notice(cmd.Context(), cmd, err); msg != "" {
fmt.Fprintln(cmd.ErrOrStderr(), msg)
}

return err
}

Expand Down
2 changes: 2 additions & 0 deletions libs/versioncheck/notice.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ const (
// once per day) and stores it in the cache, so a later command can show the
// notice without a blocking network call. It is a no-op when the notice would
// be suppressed anyway. Safe to call on every invocation.
//
//deadcode:allow Passive update notice paused for 1.4.0: unwired from cmd/root while we settle how to target long-lived, outdated environments without nagging fresh installs. Re-enable by restoring the root command calls.
func StartBackgroundRefresh(ctx context.Context, cmd *cobra.Command) {
if !notifyEnabled(ctx, cmd) {
return
Expand Down
Loading