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

Update remote settings when a setting from an extension that is running remotely is changed #1801

Closed
sbatten opened this issue Nov 6, 2019 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@sbatten
Copy link
Member

sbatten commented Nov 6, 2019

Once in devContainer with python extension installed via the devContainer config, I get prompted that IntelliCode support for Python requires a change of setting. I click the action to change the setting but this changes it in user settings, where it should likely apply to the devContainer settings.

from @sandy081

This can apply to those settings owned by extensions running remotely. We can change the strategy to update in remote machine if the setting belongs to an extension running remotely.

@Eskibear
Copy link
Member

Eskibear commented Dec 7, 2020

I'm from joelspadin-garmin/vscode-private-extension-manager#14 , which is marked as duplicated with this issue.

My experiments

I tested both Codespaces and local dev containers. According to my experiments, both machine and machine-overridable are affected. When using below API to update settings,

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

a) [OK] 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) [Buggy] 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.

@sandy081
Copy link
Member

To verify:

  • Write a sample extension that has a setting with scope machine or machine-overridable` and a command that executes following code
vscode.workspace.getConfiguration().update("setting", "value", vscode.ConfigurationTarget.Global)
  • Install this extension on remote (You can use DevContainer and install as VSIX)
  • Running above command shall update the setting in remote settings (Try when setting is written and not written in the file)

@sandy081 sandy081 added the verification-needed Verification of issue is requested label Jan 26, 2021
@connor4312 connor4312 added the verified Verification succeeded label Jan 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2021
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 verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants