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

Dev container: Install configured extensions in all profiles #176678

Closed
jvillemure opened this issue Mar 9, 2023 · 5 comments
Closed

Dev container: Install configured extensions in all profiles #176678

jvillemure opened this issue Mar 9, 2023 · 5 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author feature-request Request for new features or functionality remote-connection user-profiles User profile management verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@jvillemure
Copy link

Type: Bug

Regression since 1.76.
Today I created a new devcontainer. I normally want several extensions to be automatically installed in any container I create, so I list those in "dev.containers.defaultExtensions" in my user settings.json:

"dev.containers.defaultExtensions": [
    // ...
    "ms-vscode.cmake-tools",
    "ms-vscode.cpptools",
    "ms-vscode.hexeditor",
    "ms-vscode.makefile-tools",
    // ...
],

Expected behavior: Formerly, all extensions listed there would be installed in the new container; I didn't need to list those in my any devcontainer.json neither.
Actual behavior: My new devcontainer has 0 extensions installed in it.

I got further and also tried to explicitly listed those extensions in my new container's devcontainer.json:

"customizations": {
    "vscode": {
        "settings": {},
        "extensions": [
            // ...
            "ms-vscode.cmake-tools",
            "ms-vscode.cpptools",
            "ms-vscode.hexeditor",
            "ms-vscode.makefile-tools",
            // ...
        ]
    }
},

Expected behavior: extensions listed in devcontainer.json are install after the container is created.
Actual behavior: My new devcontainer has 0 extensions installed in it.

Steps to reproduce:

  • As explained
    Remark: I use work settings profile (non default)

VS Code version: Code 1.76.0 (92da948, 2023-03-01T10:22:44.506Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.73GB (1.09GB free)
Process Argv --crash-reporter-id c5a1a827-bcc3-4406-8db9-b4ae3a1d12c9
Screen Reader no
VM 0%
Item Value
Remote Dev Container: milo-development-environment
OS Linux x64 5.15.90.1-microsoft-standard-WSL2
CPUs 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2496)
Memory (System) 7.62GB (5.35GB free)
VM 0%
Extensions (21)
Extension Author (truncated) Version
language-x86-64-assembly 13x 3.0.0
Bookmarks ale 13.3.1
language-gas-x86 bas 0.0.2
file-icons fil 1.0.29
codespaces Git 1.13.10
remotehub Git 0.53.2023030801
vscode-drawio hed 1.6.6
better-shellscript-syntax jef 1.4.5
vscode-boost-jam mlo 0.0.2
jupyter-keymap ms- 1.1.0
remote-containers ms- 0.283.0
remote-ssh ms- 0.99.2023030315
remote-ssh-edit ms- 0.84.0
remote-wsl ms- 0.76.1
vscode-remote-extensionpack ms- 0.24.0
azure-repos ms- 0.29.2023030801
remote-explorer ms- 0.3.2023021509
remote-repositories ms- 0.31.2023030901
remote-server ms- 1.1.2023022709
conanlight Son 1.4.0
vscode-icons vsc 12.2.0

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30681850
azure-dev_surveyonecf:30548226
pyindex848:30662994
nodejswelcome1:30587005
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30672706
vsccsb:30677849
funwalk2cf:30676044

@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.76.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@sandy081
Copy link
Member

@chrmarti This is happening because dev containers extension is installing extensions in the default profile and the user is using non default profile. Is it possible to create extensions in the profile user is using while the dev container is created?

@sandy081 sandy081 added feature-request Request for new features or functionality remote-connection user-profiles User profile management labels Mar 10, 2023
@sandy081 sandy081 changed the title devcontainer creation do not install extensions anymore Dev container: Install extensions in the current user profile Mar 10, 2023
@sandy081 sandy081 added this to the Backlog milestone Mar 10, 2023
@sandy081 sandy081 changed the title Dev container: Install extensions in the current user profile Dev container: Install configured extensions in all profiles Mar 10, 2023
@sandy081 sandy081 modified the milestones: Backlog, March 2023 Mar 10, 2023
@sandy081
Copy link
Member

@chrmarti I have added --all-profiles arg to the server cli. This will allow installing extensions to all profiles. These extensions will be loaded irrespective of any user profile. Can you please adopt to this arg in dev containers extension?

@sandy081
Copy link
Member

I made another fix here that retains previous behaviour. I made extensions installed during server startup are available for all profiles. It does not need adoption from remote extensions.

sandy081 added a commit that referenced this issue Mar 15, 2023
@sandy081 sandy081 added verification-needed Verification of issue is requested author-verification-requested Issues potentially verifiable by issue author labels Mar 20, 2023
@sandy081
Copy link
Member

To verify:

  • Create and open custom profile
  • Install Dev Container Extension
  • Have the following setting in default user settings file
"dev.containers.defaultExtensions": [
    "eamodio.gitlens"
],
  • Try out a dev container sample - for eg Node sample
  • Make sure extensions defined by the container sample and also you defined in the settings are installed and loaded.

@rzhao271 rzhao271 added the verified Verification succeeded label Mar 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author feature-request Request for new features or functionality remote-connection user-profiles User profile management verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants
@rzhao271 @chrmarti @sandy081 @jvillemure @VSCodeTriageBot and others