Uncaught exception on GET /api/kernels
AttributeError: 'RemoteKernelManager' object has no attribute 'last_activity'
#1395
Labels
Description
I have an instance of Enterprise Gateway deployed that launches Yarn-based kernels which generally take between 3 to 5 minutes to fully start up and connect back to a JupyterLab client. Often when kernels are in the middle of starting we see the following uncaught exception in the GET
api/kernels
endpoint:I found an issue: jupyter/notebook#5345 that led me to my working understanding of the problem:
last_activity
field in their constructor, rather it is added later in the kernel start method.api/kernels
requests come through, EG does not handle these starting kernels gracefully.Can anyone with deeper understanding of the class hierarchies confirm this understanding?
Naively, I would think
last_activity
could be set toutcnow()
in the constructor to get around this, but perhaps there is a valid reason for not doing so?Reproduce
/api/kernels
separately while the kernels are startingExpected behavior
I would expect EG to either return a list of kernels with starting kernels in some designated starting state, or just keep them out of the list of kernels in that api response.
Context
Troubleshoot Output
``` $PATH: /opt/conda/bin /opt/conda/condabin /opt/conda/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /binsys.path:
/opt/conda/bin
/opt/conda/lib/python310.zip
/opt/conda/lib/python3.10
/opt/conda/lib/python3.10/lib-dynload
/opt/conda/lib/python3.10/site-packages
sys.executable:
/opt/conda/bin/python
sys.version:
3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:20:04) [GCC 11.3.0]
platform.platform():
Linux-6.1.82-talos-x86_64-with-glibc2.35
which -a jupyter:
/opt/conda/bin/jupyter
/opt/conda/bin/jupyter
The text was updated successfully, but these errors were encountered: