vscode-kubernetes-tools / vscode-kubernetes-tools

Kubernetes extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools
Apache License 2.0
694 stars 248 forks source link

Cannot open a new integrated terminal in a multi-root workspace #1152

Closed mcitoler closed 3 days ago

mcitoler commented 1 year ago

After opening a multi-root workspace from a .code-workspace file, the command > Terminal: Create New Terminal fails.

Expected behavior

A new integrated terminal can be created for the directory of your choice in the workspace

Current behavior

The command to create the new terminal hangs indefinitely.

# Developer: Show Logs > Window
...
2023-02-07 19:31:46.458 [error] Cannot get default system shell when there is no backend for remote authority 'k8s-container+context=minikube+podname=jupyter-6f844c7b46-hrpf6+namespace=default+name=scipy-notebook+image=jupyter/scipy-notebook:python-3.9.12': Error: Cannot get default system shell when there is no backend for remote authority 'k8s-container+context=minikube+podname=jupyter-6f844c7b46-hrpf6+namespace=default+name=scipy-notebook+image=jupyter/scipy-notebook:python-3.9.12'
    at Object.getDefaultSystemShell (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1704:6413)
    at async i.v (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1697:18560)
    at async i.r (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1697:17823)
    at async i.getDefaultProfile (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1697:17154)
    at async vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2542:32847

Steps

You can reproduce the error using minikube to setup a kubernetes cluster locally:

  1. minikube start
  2. kubectl create deployment jupyter --image=jupyter/scipy-notebook:python-3.9.12
  3. kubectl expose deployment jupyter --type=NodePort --port=8888
  4. Create a test.code-workspace file with the following contents:
    {
    "folders": [
        {
            "uri": "vscode-remote://k8s-container+context=minikube+podname=jupyter-6f844c7b46-hrpf6+namespace=default+name=scipy-notebook+image=jupyter%2Fscipy-notebook:python-3.9.12/home/jovyan/work"
        },
        {
            "uri": "vscode-remote://k8s-container+context=minikube+podname=jupyter-6f844c7b46-hrpf6+namespace=default+name=scipy-notebook+image=jupyter%2Fscipy-notebook:python-3.9.12/home/jovyan/.local"
        }
    ],
    "remoteAuthority": "k8s-container+context=minikube+podname=jupyter-6f844c7b46-hrpf6+namespace=default+name=scipy-notebook+image=jupyter%2Fscipy-notebook%3Apython-3.9.12",
    "settings": {},
    }
  5. IMPORTANT You need to update the podname=jupyter-6f844c7b46-hrpf6 bit to match yours.
  6. File > Open Workspace from File... selecting test.code-workspace above.
  7. Create a new terminal from the command palette: > Terminal: Create New Terminal > work

Additional context

Extension version: 1.3.11 VS Code version: Code 1.75.0 (Universal) (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:24:42.903Z) OS version: Darwin arm64 22.2.0 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
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)|2, 3, 3| |Memory (System)|64.00GB (32.59GB free)| |Process Argv|--crash-reporter-id fccc0c5d-88f7-46f7-8935-729cb9c181eb| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 vscccc:30610679 pyindex848cf:30577861 nodejswelcome1cf:30587006 282f8724:30602487 pyind779:30657576 89544117:30613380 pythonsymbol12cf:30657549 2i9eh265:30646982 vsccsb:30659829 ```
mcitoler commented 1 year ago

I've also encountered this other issue, https://github.com/vscode-kubernetes-tools/vscode-kubernetes-tools/issues/1151. Something might be off in the way that uris are being parsed and causing errors.

mcitoler commented 1 year ago

https://user-images.githubusercontent.com/15109293/219156890-d01881e2-88fd-48a4-a7f2-0953bda66b85.mov

mcitoler commented 3 days ago

No longer an issue.