microsoft / vscode-jupyter-hub

Jupyter Hub Support in VS Code
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-hub
MIT License
9 stars 7 forks source link

Jupyter Hub Servers are started unnecessarily #47

Open stviaene-si opened 9 months ago

stviaene-si commented 9 months ago

Would it be possible to make the extension not autostart servers if they are not alive?

I often have multiple Jupyter notebooks open, and have a JupyterHub that I sometimes (but rarely) connect to. Every time I open vscode it starts a JupyterHub server that I'm not planning to connect to (because I have a notebook open).

Yefee commented 9 months ago

This is also related to connected to a named sever.

wietzesuijker commented 4 months ago

Adding "jupyter.disableJupyterAutoStart": true, to your settings.json seems to resolve the issue (https://github.com/microsoft/vscode-jupyter/issues/1269#issuecomment-946162122).

DonJayamanne commented 3 months ago

Adding "jupyter.disableJupyterAutoStart": true, to your settings.json seems to resolve the issue

If that does work, its not by design. Unfortunately the way Jupyter and Jupyter Hub extensions work today is as follows

In all of these cases, Jupyter Hub has idea about the context, hence will start the server regardless.

DonJayamanne commented 3 months ago

Suggestion:

(internal notes)

Add purpose in the resolveJupyterServer API call This way the server providers will know why the server is being resolved. However the implementation in Jupyter is more complicated than that