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

Add ability to auto update Insiders build of extension #2772

Closed
DonJayamanne opened this issue Oct 3, 2018 · 16 comments
Closed

Add ability to auto update Insiders build of extension #2772

DonJayamanne opened this issue Oct 3, 2018 · 16 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@DonJayamanne
Copy link

DonJayamanne commented Oct 3, 2018

Others have done this microsoft/vscode#15756 (comment)

Updating label to code health + enhancement.
I.e. even if not exposed to end users, it would be good for in-house use. Much like out of band LS installs.

@DonJayamanne DonJayamanne added feature-request Request for new features or functionality feature-* labels Oct 3, 2018
@d3r3kk
Copy link

d3r3kk commented Oct 3, 2018

We already have the python file to do this...

@DonJayamanne
Copy link
Author

DonJayamanne commented Oct 4, 2018

Note: This is not for extension authors. That python file builds the extension.
This is for users of the developer build of the extension, i.e. dog fooding.
VSC doesn't provide a pre-release channel of extensions, and that's why we host our extension on a blob store, and users need to install it manually.

The benefit, is:

  • We'll have a regular set of users who are constantly testing/using the dev version of the extension.
  • We have the potential to get feedback before the release.

Either way, this would be great for in house developers.

UX (similar to out of band installs of LS):

  • Download and install extension daily, weekly
  • Manual download and install of the extension (via some command)

@DonJayamanne DonJayamanne added the debt Covers everything internal: CI, testing, refactoring of the codebase, etc. label Oct 4, 2018
@brettcannon brettcannon added needs proposal Need to make some design decisions and removed needs decision labels Oct 22, 2018
@DonJayamanne
Copy link
Author

@luabud /cc

@DonJayamanne
Copy link
Author

DonJayamanne commented Feb 7, 2019

Will need to consider impact of downloading LS every time we update the extension (e.g. if we update extension every day, then LS will be downloaded every day).

See #4323

@qubitron qubitron changed the title Add ability to auto update developer build of extension Add ability to auto update Insiders build of extension Feb 26, 2019
@DonJayamanne
Copy link
Author

  • Have a look at how C++ extension does the auto updating.

@luabud luabud removed the debt Covers everything internal: CI, testing, refactoring of the codebase, etc. label Mar 12, 2019
@DonJayamanne
Copy link
Author

DonJayamanne commented Mar 27, 2019

Prescribed Solution

  • Download vsix
  • Install the extension using a the command vscode.commands.executeCommand('workbench.extensions.installExtension', Uri.file('path-to-vsix'));
    • This command is available in the latest version of VS Code.

Check spec for UX

@luabud luabud added needs PR and removed needs proposal Need to make some design decisions labels May 28, 2019
@DonJayamanne DonJayamanne added needs proposal Need to make some design decisions and removed needs proposal Need to make some design decisions labels May 29, 2019
@DonJayamanne DonJayamanne added this to the 2019 - May Sprint 11 milestone May 29, 2019
@DonJayamanne DonJayamanne assigned karrtikr and unassigned karrtikr Jun 10, 2019
@karrtikr karrtikr assigned karrtikr and unassigned karrtikr Jun 10, 2019
@DonJayamanne DonJayamanne removed this from the 2019 - May Sprint 11 milestone Jun 12, 2019
@karrtikr
Copy link

karrtikr commented Jul 11, 2019

Download the development build vsix and install it.
A user setting python.insidersChannel is added. Default value is Stable.

VSCODE INSIDERS

Expected first session:

Insiders is installed first, and then the following message is displayed:

  • We noticed you are using VS Code Insiders. Reload to use the Insiders build of the extension.
    [Use Stable] [Reload]
    • Option 1 - 'Use Stable'
      • Setting gets set to 'Stable, Stable` is installed. We do not reload and No reload prompt shows up.
    • Option 2 - 'Reload'
      • Setting gets changed to 'InsidersWeekly' and we reload.
    • Option 3- Close the prompt
      • Setting gets changed to 'InsidersWeekly', we do not reload. Note insiders is already installed, but not used. (Will be using insiders from the next session)
        Please reload to use the insiders build of the extension

Expected second session:

Open user settings.json. Verify setting python.insidersChannel shows up with the correct value. Here's what you will according to the option selected:

  • Option 1 - 'Use Stable'

    Note: You will see in the following behavior in Extension Development Host, ignore this. The actual behavior in the VSIX will be different. If using VSIX, you will note that Stable is already installed and nothing happens, which is the expected behavior.

    • Once extension activates, Stable will be installed again. You will get a Reload prompt, 'Please reload while switching between channels'. Ignore that.
  • Option 2 - 'Reload'

    • Insiders version of extension is installed.

VSCODE STABLE

Expected first session: No such prompt is displayed, user keeps using the stable extension.

ON CHANGING CHANNEL MID-SESSION

You will see the following commands in the command palette which sets the setting to the corresponding channel:

  • Switch to InsidersWeekly - Does not show up when channel is 'InsidersWeekly'. Using this will install insiders build and You will get a Reload prompt, 'Please reload while switching between channels'.
  • Switch to InsidersDaily - Does not show up when channel is 'InsidersDaily'. Using this will install insiders build and You will get a Reload prompt, 'Please reload while switching between channels'.
  • Switch to Stable - Does not show up when channel is 'Stable'. Using this will install stable build and You will get a Reload prompt, 'Please reload while switching between channels'.

@brettcannon
Copy link
Member

I got a language server extraction failure:

Language server extraction failed
Error: ENOENT: no such file or directory, open 'C:\Users\brcan\.vscode-insiders\extensions\ms-python.python-2019.7.24761-dev\languageServer.0.3.22\cs\Microsoft.VisualStudio.Threading.resources.dll'
Starting Jedi Python language engine.

@brettcannon
Copy link
Member

brettcannon commented Jul 11, 2019

The prompt says "Please reload the window switching between insiders channel". I would reword that as "Please reload the window to change the insiders channel" (or something; the original sentence doesn't read like an explanation).

@brettcannon
Copy link
Member

You still get prompted if you already have the setting specified. We should probably skip if it's set.

@brettcannon
Copy link
Member

Making manual installs work

The problem is if you install via .vsix you will get it immediately overwritten by the "Stable" default setting. The proposed fix is:

  1. Drop "Stable"
  2. Add a "default" setting which is "we do nothing, VS Code handles things"
  3. Rename "InsidersWeekly" and "InsidersDaily" to "weekly" and "daily", respectively)

This will then let .vsix installs work as expected. People can revert back using the built-in support in VS Code for rolling back to older versions. This also won't break people who are using forks of the extension as otherwise we would start forcibly updating them to stable or our insiders builds instead of their fork.

@karrtikr
Copy link

karrtikr commented Jul 12, 2019

Suppose a user is using "weekly/daily", and he decides to install an older version of the extension. He would still be forced to use the insiders version of the extension. I don't think we want that either.

@brettcannon
Copy link
Member

@karrtikr I don't think it can be avoided. If you want to control what version of the extension you want installed you then need to be on the "default" setting to let VS Code handle it for you, otherwise you're handing installation control to us under "weekly" and "daily".

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented Aug 1, 2019

I have verified that I now have a "python.insidersChannel" user setting. Switching it to "daily" it immediately downloaded the .vsix and prompted me to reload. So that all looks good.

However...

From #2772 (comment) I gather that, when using insiders already, I was supposed to be prompted about what I wanted to do. I was never prompted. It simply used the default setting, "off". That's fine, but if that expected prompt was a requirement for this feature then this issue needs more work.

@luabud, what needs to be done here?

@ghost ghost removed the needs PR label Aug 5, 2019
@ericsnowcurrently
Copy link
Member

FWIW, Don manually double-checked about the prompt. It worked as expected. I must have been prompted a while back and VS Code still remembered.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

7 participants