vscode-private-extension-manager
vscode-private-extension-manager copied to clipboard
Remote wsl/ssh connections not showing correct version/channel
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.
When I select 'insiders' it installs correctly, but the list of extensions still shows the old version, as does the details view.
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.
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?
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.
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.)
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.
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.
I have no privateExtensions
settings in my User settings - either local or remote.
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
The issue above was marked a duplicate of https://github.com/microsoft/vscode-remote-release/issues/1801
@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.