From 2f0fafc96a80e096dc0ff971d4a106bdfaa3be6d Mon Sep 17 00:00:00 2001 From: simonfaltum Date: Tue, 16 Jun 2026 11:58:20 +0200 Subject: [PATCH] Pause the passive CLI update-available notice The once-per-day "new release available" notice (#5470) is unreleased: it merged after v1.3.0 and would first reach users in v1.4.0. Pause it before it ships by unwiring it from the root command, so the background GitHub fetch and the notice never run. The explicit databricks version --check command (#5469, shipped in v1.3.0) is unaffected. We are not confident the passive notice targets the right users yet: as written it would nag a fresh install (very likely already up to date) as readily as the long-lived, outdated environments we actually want to reach. Keep the implementation in libs/versioncheck so re-enabling is a small change once we settle on the targeting. Co-authored-by: Isaac --- NEXT_CHANGELOG.md | 1 - cmd/root/root.go | 12 ------------ libs/versioncheck/notice.go | 2 ++ 3 files changed, 2 insertions(+), 13 deletions(-) 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