diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 0313fa50fc1..ec7f3f2886d 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -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)). diff --git a/cmd/root/root.go b/cmd/root/root.go index 3cf4ab08605..d1b12ac7f69 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -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" ) @@ -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 } @@ -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 } diff --git a/libs/versioncheck/notice.go b/libs/versioncheck/notice.go index f072d0ab863..39c985e82c8 100644 --- a/libs/versioncheck/notice.go +++ b/libs/versioncheck/notice.go @@ -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