Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't nag the user about updates #783

Closed
mtbambora opened this issue Sep 20, 2021 · 13 comments
Closed

Don't nag the user about updates #783

mtbambora opened this issue Sep 20, 2021 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@mtbambora
Copy link

mtbambora commented Sep 20, 2021

Versions

This bug is reproducible in:

  • [ x] the latest version of the extension (below)
  • [ x] the latest version of the language server (below)

Operating System

Find version and build (32-bit or 64-bit) of your OS

  • Windows 10 running WSL (Arch Linux)

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install Terraform VSCode extension
  2. Wait until there is a new update
  3. See nagging dialog to update extension

Expected Behavior

Upgrades should be done silently, like other VSCode extensions

Actual Behavior

A pop-up appears to nag the user to update
image

Additional context

So often I start VSCode and see this nagging about updating extension. Terraform extension should not nag the user.

@mtbambora mtbambora added the bug Something isn't working label Sep 20, 2021
@radeksimko radeksimko added enhancement New feature or request and removed bug Something isn't working labels Sep 20, 2021
@radeksimko radeksimko changed the title Don't bug user about updates Don't nag the user about updates Sep 20, 2021
@radeksimko
Copy link
Member

Thank you for the suggestion @mtbambora

We are considering the idea of bundling the language server with the extension. Silent updates also came up in the past - whether or not we'd still perform updates when we bundle a particular version of LS with the extension remains a question. We will need to consider some trade-offs.

@radeksimko
Copy link
Member

radeksimko commented Sep 20, 2021

FWIW there is at least one extension which behaves exactly the same way as ours - https://marketplace.visualstudio.com/items?itemName=golang.Go

I'm not suggesting this is best practice UX (I genuinely don't know what is as it doesn't seem to be documented anywhere), but just to provide some extra data/context.

Generally not all extensions use language servers, but I'd really like us to list some top N popular ones which do use LS and understand how they handle the updates.

@robdaemon
Copy link

I would be fine with a setting that allows me to turn off the notification, or to only show it when I view a Terraform file. I do a lot of work in VS Code, and only maybe 10% of it is Terraform. This notification pops up more often than I actually make Terraform changes.

@mtbambora
Copy link
Author

I have the situation as @robdaemon, only Terraform extension asks me to update. An option to disable notification, or even disable checking for updates would work fine. I don't need the latest and greatest.

@lukasz-mitka
Copy link

I propose providing three options to control update behavior: silent, ask, disabled

@jpogran
Copy link
Contributor

jpogran commented Sep 22, 2021

I agree that there needs to be an option for the user to decide whether to update the extension/language server or at all, but I disagree it needs to be inside this pop-up window. From personal experience, adding lots of buttons with short names confuses, and adding lots of buttons with long descriptive names makes the box large and distracting.

I propose we honor the existing settings inside VS Code: extensions.autoCheckUpdates and extensions.autoUpdate. These are built-in settings to the editor that determine whether VS Code updates extensions, or whether it checks for an update at all. If we read these values we can determine if we need to initiate a check or an update without having to have a separate workflow. We can also fully remove the pop-up message entirely, as we know that the user intent is reflected in the settings without having to ask.

This does mean that a user has to disable automatically updating all extensions if they do not want to update ours, but this is the pattern that VS Code wants, so I'm comfortable following it's lead.

@robdaemon
Copy link

robdaemon commented Sep 22, 2021

This does mean that a user has to disable automatically updating all extensions if they do not want to update ours, but this is the pattern that VS Code wants, so I'm comfortable following it's lead.

I have several extensions installed in VS Code, and they update themselves quite regularly. The Terraform extension is the only one that regularly pops up a dialog at VS Code launch asking me to install something else. It's great that the language server components are updated frequently - it really is! But they should be distributed with the plugin instead of this dialog asking for the user to update it.

(edit: took out my unnecessary snark at the end)

@jpogran
Copy link
Contributor

jpogran commented Sep 22, 2021

But they should be distributed with the plugin instead of this dialog asking for the user to update it.

@robdaemon agreed! We're actually actively researching that, we just haven't created a issue yet. The language specific stuff we provide is in a Golang binary, which is platform specific. We would have to bundle all CPU arch and platforms we support ( 3archs, ~6 different platforms, etc) in the VSIX in order to not download ourselves. That makes the VSIX larger and take longer to extract/install and could trigger a false positive in an AV.

To address this we had several approaches we were working on, but ultimately we were waiting for something called platform specific extension to land in VS Code here. This requires VS Code v1.60 or greater, so we're figuring out how to be ready when that becomes more mainstream.

In the meantime, I understand your point about the pop-ups and that it behaves differently than VS Code expects. That's why I'm suggesting removing the pop-up question entirely and deciding based on the existing settings you control already. This way, if you have the defaults, you stay consistently updated and are never prompted. If you change the default to false for either setting, you control the behavior accordingly and are still never prompted. The net result is no prompts ever and we behave like other extensions.

@mtbambora
Copy link
Author

image

@jpogran
Copy link
Contributor

jpogran commented Jan 5, 2022

In #868 we configured the extension to silently install the terraform-ls binary without prompting the user. This is currently released in the preview extension if you would like to try this out now. We will be releasing this to stable in the near future.

@jpogran
Copy link
Contributor

jpogran commented Jan 10, 2022

This has been released in the 2.18.0 version. Please let us know if this works for you!

@jpogran
Copy link
Contributor

jpogran commented Feb 3, 2022

This has been out for about a month, so this is safe to close now.

We also have recently bundled the terraform-ls binary inside the extension in the preivew, which removes the need to download it at all separately. This will be merged to stable soon.

@jpogran jpogran closed this as completed Feb 3, 2022
@jpogran jpogran self-assigned this Feb 3, 2022
@github-actions
Copy link

github-actions bot commented Mar 6, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants