turso-cli icon indicating copy to clipboard operation
turso-cli copied to clipboard

Forced automatic upgrade experience sucks

Open penberg opened this issue 2 years ago • 4 comments
trafficstars

I was doing turso db shell autocomplete, but it was just hanging forever.

I then ran turso db list and the output looked like this:

penberg@vonneumann limbo % turso db list
NAME            URL
testing          libsql://testing-penberg.turso.io
Updating to the latest version
Casks/a/affine.rb already exists, no checkout
Casks/b/batchoutput-pdf.rb already exists, no checkout
Casks/b/brickstore.rb already exists, no checkout
error: could not restore untracked files from stash
Updated 4 taps (tursodatabase/tap, redpanda-data/tap, homebrew/core and homebrew/cask).
==> New Formulae
azion-cli           haiti               snyk-cli            three-body
==> New Casks
batchoutput-pdf
==> Outdated Formulae
abseil              gh                  libuv               pycparser
asciinema           glib                libx11              pygments
assimp              gmp                 libxcb              [email protected]
awscli              gnutls              llvm                [email protected]
boost               grpcurl             luajit              [email protected]
brotli              harfbuzz            luajit-openresty    qemu
c-ares              hugo                maven               six
cairo               jpeg-turbo          mysql-client        sphinx-doc
capstone            jq                  nghttp2             sqld
ccloud              k6                  node                sqlite
cffi                krb5                node@16             turso
cmake               libevent            oniguruma           unbound
deno                libfido2            openjdk             unixodbc
docutils            libnghttp2          openjdk@11          vault
erlang              libpng              [email protected]         wabt
esbuild             libpq               openssl@3           wxwidgets
flyctl              libpthread-stubs    p11-kit             zlib
freetype            libssh              protobuf
gettext             libtiff             pscale
==> Outdated Casks
ngrok

You have 74 outdated formulae and 1 outdated cask installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
==> Upgrading 1 outdated package:
tursodatabase/tap/turso 0.86.3 -> 0.87.0
==> Fetching tursodatabase/tap/turso
==> Downloading https://github.com/tursodatabase/homebrew-tap/releases/download/
==> Downloading from https://objects.githubusercontent.com/github-production-rel
######################################################################### 100.0%
==> Upgrading tursodatabase/tap/turso
  0.86.3 -> 0.87.0


Welcome to Turso!

If you are a new user, please sign up with turso auth signup; otherwise login
with turso auth login. When you are authenticated, you can create a new
database with turso db create. You can also run turso help for help.

For a more comprehensive getting started guide, open the following URL:

  https://docs.turso.tech/tutorials/get-started-turso-cli

==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
==> Summary
🍺  /opt/homebrew/Cellar/turso/0.87.0: 6 files, 18.5MB, built in 8 seconds
==> Running `brew cleanup turso`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /opt/homebrew/Cellar/turso/0.86.3... (6 files, 18.5MB)
Removing: /Users/penberg/Library/Caches/Homebrew/turso--0.86.3.tar.gz... (5.6MB)

Let's make sure that the forced auto-upgrade does not screw up the developer experience like this. For example, autocomplete should never trigger it. Also, the output of auto-upgrade should be silent by default, and the actual command people wanted to run should run after the update.

penberg avatar Oct 25 '23 07:10 penberg

@gris

haaawk avatar Oct 25 '23 08:10 haaawk

I'm using nix to manage my system, this feature screws it up. Please make this an optional opt-in feature. Or at least have the CLI ask if I want to update or not before it does it.

Found a setting in the code that might help:

https://github.com/tursodatabase/turso-cli/blob/4a3ef7eedc54d94b40ff3999c41963cf0fd589b3/internal/cmd/config.go#L36C9-L44

tstachl avatar Nov 16 '23 16:11 tstachl

@tstachl it is optional, you can set it off with turso config set autoupdate off

gris avatar Nov 16 '23 18:11 gris

Please support an environment variable for disabling this

rawkode avatar Feb 28 '24 10:02 rawkode