microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.25k stars 29.3k forks source link

[Codespaces] machine-overridable, experimental setting changes its value when the focus changes #145079

Open wwlorey opened 2 years ago

wwlorey commented 2 years ago

Does this issue occur when all extensions are disabled?: No

Steps to Reproduce: This reproduces with the "Azure: Authentication Library" setting from the Azure Account Extension. Definition in package.json: https://github.com/microsoft/vscode-azure-account/blob/1268dab932c324a63f9875b96e3cf6dca742cfa2/package.json#L224

  1. In Codespaces, install the Azure Account Extension
  2. Open user settings with the "Preferences: Open Settings (UI)" command
  3. Select user settings and use the drop down on the left to navigate to "Extensions" -> "Azure configuration".
  4. Modify the "Azure: Authentication Library" setting and then click away from the dropdown box to change focus as shown below. The setting reverts back to the default value.

https://user-images.githubusercontent.com/22795803/158266976-6c613eff-4c9e-4dff-84ab-38ad330e6692.mov

More info: This setting does not appear when searching the user settings even though it can be navigated to in the user settings tree. It does appear in a search of the workspace settings as expected.

image image

Related: https://github.com/microsoft/vscode-azure-account/issues/482

rzhao271 commented 2 years ago

Adding @sandy081 in case this is more of a settings sync issue. I can reproduce the issue in Codespaces, but I can't reproduce it using the desktop client.

Edit: I also notice the issue doesn't occur with the azure.cloud setting.

rzhao271 commented 2 years ago

Interesting. The value seems to save into the JSON file, but with a warning: This setting cannot be applied in this window. It will be applied when you open a local window.

sandy081 commented 2 years ago

Machine-overridable setting (machine-overridable scope) is not supported in user settings. It shall not be shown in the UI.

rzhao271 commented 2 years ago

One issue in this case is that the user might be confused if there are no matches, so I'm also thinking of changing the text displayed when no matches are found.