jupyter / jupyter/notebook

Invoke 'Reconnect to kernel' (Websockets) when requesting kernel status through REST calls

Open
#4,252 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

This enhancement is suggested on facing [#516](https://github.com/jupyter/enterprise_gateway/issues/516).

Configuration - JupyterLab with Jupyter Enterprise Gateway (in YARN Cluster Mode) to launch remote IPython kernels on YARN-managed clusters.
System - OSX
JupyterLab version - 0.33.12

When the Notebook server loses connection to the kernels, it polls the state of the kernels through REST calls. If it's able to retrieve the kernel state and it's in active/idle state, it does not attempt the `reconnect` to kernel (websockets), which needs to be invoked explicitly by choosing [Kernels -> reconnect] in classic Jupyter Notebooks and [Reconnect to kernel] in JupyterLab.

(See [#516](https://github.com/jupyter/enterprise_gateway/issues/516) for the issue this causes)

A reconnect attempt (I think) is a harmless activity and does not interfere with the state of the kernel, so should be invoked automatically.

cc: @kevin-bates

Contributor guide

Open the contributing guide

Research direction

Start by tracing how REST kernel-status requests are handled and where the websocket reconnect flow is implemented for JupyterLab and Enterprise Gateway. Reproduce the YARN cluster configuration described here and compare polling with an explicit reconnect. Done means an automatic reconnect occurs after the kernel state is retrieved without disrupting active or idle kernels.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.