vscode-private-extension-manager icon indicating copy to clipboard operation
vscode-private-extension-manager copied to clipboard

Remote wsl/ssh connections not showing correct version/channel

Open jamesbattersby opened this issue 4 years ago • 9 comments

When running on Windows with a remote WSL or remote SSH connection there is an issue when switching release channel for a private extension.

Selecting "switch release channels.." correctly shown the channels I have (latest and insiders) and the correct versions of my extension.

image

When I select 'insiders' it installs correctly, but the list of extensions still shows the old version, as does the details view.

image

If I re-select the insiders version I just installed, I get a pop up saying that I'm now tracking insiders. The displayed version still stays on the latest channel.

This works fine when not using a remote connection.

image

jamesbattersby avatar May 03 '20 14:05 jamesbattersby

I've noticed some issues with vscode not firing the events I use to check when an extension gets installed/updated when in a remote connection.

You should get a notification telling you to reload the window after installing a new version. Does that not appear, or does this persist even after reloading the window?

joelspadin-garmin avatar May 04 '20 16:05 joelspadin-garmin

Yeah, I get the reload notification and the correct version is installed.

What I have found is that the setting to use the insider channel is not saved. If I add this by hand it works just fine.

jamesbattersby avatar May 04 '20 19:05 jamesbattersby

Hmm. I'm telling vscode to update the global configuration: https://github.com/joelspadin-garmin/vscode-private-extension-manager/blob/b84e933054951d812641cfe1650d543d1de4f911/extension/src/releaseChannel.ts#L58-L60

When you add the channel by hand, which config file are you editing? Do you have the setting defined in multiple places? (See all the tabs on vscode's settings page for all the places it could be defined.)

joelspadin-garmin avatar May 04 '20 19:05 joelspadin-garmin

The settings I'm looking at are Remote: [WSL:Ubuntu].

A bit more testing shows that these settings are not updated when switching channels. However, if I add the privateExtensions.channels setting by hand it starts working and I can switch channels no problem, the settings are updated.

When not in remote mode, the setting is added if it is missing.

jamesbattersby avatar May 04 '20 20:05 jamesbattersby

Do you happen to have the setting set in your user settings when it fails to update your remote settings? Code doesn't give me any obvious way to pick which setting file to update aside from ConfigurationTarget, and that doesn't appear to differentiate between user and machine settings.

I'll see if I can find a better way to do this next time I have some free time.

joelspadin-garmin avatar May 08 '20 17:05 joelspadin-garmin

I have no privateExtensions settings in my User settings - either local or remote.

jamesbattersby avatar May 08 '20 19:05 jamesbattersby

As far as I can tell this is an issue with VS Code's API. I've reported it at https://github.com/microsoft/vscode/issues/102543

joelspadin-garmin avatar Jul 14 '20 23:07 joelspadin-garmin

The issue above was marked a duplicate of https://github.com/microsoft/vscode-remote-release/issues/1801

joelspadin-garmin avatar Nov 13 '20 15:11 joelspadin-garmin

@joelspadin-garmin Same issue for me, remote scenarios.

According to my experiments, both machine and machine-overridable are affected. When using below API to update config,

vscode.workspace.getConfiguration("foo").update("bar", "value", vscode.ConfigurationTarget.Global)

a) if foo.bar has already defined in your machine level settings.json

  • e.g. /home/vscode/.vscode-server/data/Machine/settings.json or /home/codespace/.vscode-remote/data/Machine/settings.json
  • new value is correctly updated inplace.

b) if foo.bar is NOT explicitly defined in machine level settings.json

  • "foo.bar": "value" is wrongly added in user level settings.json, the same as described in this issue, which I believe is an upstream bug.

Eskibear avatar Dec 07 '20 07:12 Eskibear