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

Jupyter Hub Servers are started unnecessarily #47

Open
stviaene-si opened this issue Feb 19, 2024 · 4 comments
Open

Jupyter Hub Servers are started unnecessarily #47

stviaene-si opened this issue Feb 19, 2024 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@stviaene-si
Copy link

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).

@stviaene-si stviaene-si added the feature-request Request for new features or functionality label Feb 19, 2024
@Yefee
Copy link

Yefee commented Feb 22, 2024

This is also related to connected to a named sever.

@wietzesuijker
Copy link

Adding "jupyter.disableJupyterAutoStart": true, to your settings.json seems to resolve the issue (microsoft/vscode-jupyter#1269 (comment)).

@DonJayamanne DonJayamanne self-assigned this Jul 25, 2024
@DonJayamanne
Copy link
Collaborator

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

  • Jupyter extension will ask Jupyter Hub for the Url of the server
  • Jupyter Hub has no idea why the Url is being requested
    • It could be because the user is about to run a notebook, hence user needs to select a kernel
    • It could be because the user opens a notebook that was previously executeb by a kernel from Jupyter hub,
    • etc

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

@DonJayamanne
Copy link
Collaborator

DonJayamanne commented Jul 30, 2024

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

@DonJayamanne DonJayamanne changed the title Add option to disable autostart Jupyter Hub Servers are started unnecessarily Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants