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

devcontainer.json settings should take precedence over image metadata #7254

Closed
alexdima opened this issue Sep 27, 2022 · 4 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded

Comments

@alexdima
Copy link
Member

Testing #7248

{
	"image": "test-base-image",
	"postAttachCommand": "echo 'Hello from the postAttachCommand in the workspace image!'",
	"customizations": {
		"vscode": {
			"extensions": ["ms-vscode.hexeditor"],
			"settings": {
				"terraform.languageServer.enable": false
			}
		}
	}
}
  • (notice the above configures "terraform.languageServer.enable": false)
  • Rebuild Container and open the machine settings
  • observe the setting is "terraform.languageServer.enable": true instead of false.
@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers labels Sep 28, 2022
@chrmarti chrmarti added this to the September 2022 milestone Sep 28, 2022
chrmarti added a commit to devcontainers/cli that referenced this issue Sep 29, 2022
chrmarti added a commit to devcontainers/cli that referenced this issue Sep 29, 2022
@rzhao271 rzhao271 added verified Verification succeeded and removed verified Verification succeeded labels Sep 29, 2022
@rzhao271
Copy link

rzhao271 commented Sep 30, 2022

The Terraform extension doesn't seem to install for me when I attach to the running container

@rzhao271
Copy link

rzhao271 commented Oct 3, 2022

@alexdima are you able to verify this issue?

@rzhao271 rzhao271 added the verification-steps-needed Steps to verify are needed for verification label Oct 4, 2022
@rzhao271
Copy link

rzhao271 commented Oct 6, 2022

I also tried rebuilding and reopening the workspace container, selecting the Alpine Linux definition. Then, I installed the Hashicorp Terraform extension, which doesn't come with the terraform.languageServer.enable setting.

@chrmarti
Copy link
Contributor

chrmarti commented Oct 6, 2022

Attaching to an existing container does not yet apply the metadata (like install extensions). This is tracked as #7252.

To verify:

  • Reopen a folder with the following devcontainer.json in a container:
{
	"image": "mcr.microsoft.com/devcontainers/rust:1",
	"customizations": {
		"vscode": {
			"settings": {
				"rust-analyzer.checkOnSave.command": "check"
			}
		}
	}
}
  • Verify in the machine settings look like:
{
	"lldb.executable": "/usr/bin/lldb",
	"files.watcherExclude": {
		"**/target/**": true
	},
	"rust-analyzer.checkOnSave.command": "check"
}
  • Specifically the rust analyzer setting should be "check".

@chrmarti chrmarti removed the verification-steps-needed Steps to verify are needed for verification label Oct 6, 2022
@rzhao271 rzhao271 added the verified Verification succeeded label Oct 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants