Commit 2f28778
authored
Pause the passive CLI update-available notice (#5613)
## Why
The CLI gained a passive, once-per-day "a new release is available"
notice in #5470. It merged right after v1.3.0 was tagged, so it hasn't
shipped to anyone yet; v1.4.0 would be its first release. This pauses it
before that happens.
The notice is meant for people running an outdated CLI in a long-lived
local environment. But as written it can't distinguish them from a
brand-new install, which is almost always already up to date. So the
person most likely to see the very first nudge is someone who just
installed the CLI and has nothing to upgrade, while the background
GitHub call runs for everyone. Until we have a way to target the case we
actually care about, the safer default is off.
The explicit `databricks version --check` command (#5469, shipped in
v1.3.0) is unaffected: users who want to check stay in control.
## Changes
Before: every interactive command started a background check against
GitHub and could print an upgrade notice after the command finished.
Now: the passive notice is unwired from the root command, so neither the
background fetch nor the notice runs. A normal command makes no call to
GitHub.
- Remove the `StartBackgroundRefresh` and `Notice` calls (and the
import) from `cmd/root/root.go`.
- Drop the unreleased `NEXT_CHANGELOG.md` entry, since the feature won't
ship in 1.4.0.
- Keep the implementation in `libs/versioncheck` intact, with a
`//deadcode:allow` note explaining the pause. Re-enabling is just
restoring the two root-command calls once we settle on the targeting.
## Test plan
- [x] `go build ./...`
- [x] `go test ./libs/versioncheck/... ./cmd/root/... ./cmd/version/...`
- [x] `./task fmt-q`, `./task lint-q`, and `./task checks` clean
(including the deadcode gate)
This pull request and its description were written by Isaac.1 parent 61c5d11 commit 2f28778
3 files changed
Lines changed: 2 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 84 | | |
91 | 85 | | |
92 | 86 | | |
| |||
204 | 198 | | |
205 | 199 | | |
206 | 200 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | 201 | | |
214 | 202 | | |
215 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
0 commit comments