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

Add support for pending kernels #712

Merged
merged 4 commits into from
Nov 22, 2021
Merged

Conversation

blink1073
Copy link
Contributor

@blink1073 blink1073 commented Oct 18, 2021

Add MultiKernelManager.use_pending_kernels to use a created kernel before the process has started, based on original discussion in jupyter_server.

Add a KernelManager.ready property to that resolves when the process has started for the first time.

Refuse to restart a kernel that has not been fully started - we could also decide to wait if it has been launched but not fully started.

Consumers using use_pending_kernels should wait for the ready future before attempting to communicate with the kernel.

This change will correspond to a change in jupyter_server, where the server will use the ready future before connecting the websocket.

Web clients will have to be updated to handle errors on WebSocket startup and surface them to the user.

As a result, the use of use_pending_kernels will be opt-in for now.

@blink1073
Copy link
Contributor Author

Thanks @davidbrochart. I marked it as draft for discussion and because I still need to add tests for the new feature.

@blink1073
Copy link
Contributor Author

blink1073 commented Oct 21, 2021

TODO:

  • Add a test where there is a bad kernelspec.

@blink1073 blink1073 added this to the 7.1 milestone Oct 22, 2021
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks Steve!

@blink1073
Copy link
Contributor Author

Thanks for the review! I'll make a release with this on Monday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants