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

Set scope to machine for imageBuildContextPath #1791

Merged
merged 2 commits into from
Mar 26, 2020
Merged

Conversation

haniamr
Copy link
Contributor

@haniamr haniamr commented Mar 26, 2020

This will essentially avoid reading this setting (if set in the User settings) in remote scenarios, which makes sense since the path might not make sense when running in a container/WSL.

@haniamr haniamr added this to the 1.1.0 milestone Mar 26, 2020
@haniamr haniamr requested a review from a team as a code owner March 26, 2020 01:01
@haniamr haniamr linked an issue Mar 26, 2020 that may be closed by this pull request
@karolz-ms
Copy link
Contributor

karolz-ms commented Mar 26, 2020

According to the docs the "machine" scope can be set in "user or remote settings". So changing the scope does not really prevent setting imageBuildContextPath at user level and messing up the remote scenario? In general, anything seems to be configurable at user level; various scopes are there to define what is the lowest possible level of configuration where a setting might be overriden.

Am I reading the docs wrong?

@haniamr
Copy link
Contributor Author

haniamr commented Mar 26, 2020

According to the docs the "machine" scope can be set in "user or remote settings". So changing the scope does not really prevent setting imageBuildContextPath at user level and messing up the remote scenario? In general, anything seems to be configurable at user level; various scopes are there to define what is the lowest possible level of configuration where a setting might be overriden.

Am I reading the docs wrong?

Well, that's how it is written in the docs:

Machine specific settings that can be set in user or remote settings. For example, an installation path which shouldn't be shared across machines.

I had to try it to ensure I understand it correctly, here is what I did:

  • Set the property to some path (i.e. c:\temp) in the User settings
  • Open the folder in VSCode Remote (WSL is the one I tried)
  • Now the setting is not found under "User" and it shows as empty under "Remote"
    image

So this confirms what I understand about the property, where "User" settings do not get used in remote scenarios if the scope is set to "machine", and vice versa. I think the documentation needs to explain it further by using a proper example, the linked issue has more details to it as well.

@karolz-ms
Copy link
Contributor

Allright, thanks Hani, what you are saying makes sense. The docs are confusing 😐

package.json Outdated Show resolved Hide resolved
Co-Authored-By: Karol Zadora-Przylecki <[email protected]>
@haniamr haniamr merged commit a0bd864 into master Mar 26, 2020
@bwateratmsft bwateratmsft removed this from the 1.1.0 milestone Mar 27, 2020
@bwateratmsft bwateratmsft deleted the hani/machine-scope branch September 22, 2020 18:21
Dmarch28 pushed a commit to Dmarch28/vscode-docker that referenced this pull request Mar 4, 2021
* Set scope to machine for imageBuildContextPath

* Update package.json

Co-Authored-By: Karol Zadora-Przylecki <[email protected]>

Co-authored-by: Karol Zadora-Przylecki <[email protected]>
@microsoft microsoft locked and limited conversation to collaborators Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flag machine specific configurations like paths as machine scoped
3 participants