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

Fix multiple sessions in one kernel bug #451

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rakhmaevao
Copy link

I found the following error

How to reproduce the bug?

  1. Run jupyverse jupyterlab
  2. Create a session for the kernel. The kernel itself will start and a session will be created for it.
  3. Add another session to the running kernel.

Expected behavior

The session will be added

Actual behavior

Error (see below).

Screencast.from.2024-12-11.15-04-34.mp4
  File "/home/rakhmaevao/Projects/jupyverse/plugins/kernels/fps_kernels/routes.py", line 187, in create_session
    connection_file=self.kernel_id_to_connection_file[kernel_id],
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: '68527f9d-7362-4c0a-ac66-d9e429a78246'

How did I fix it?

  1. After creating a new kernel (see step 2 of the instructions for reproducing the bug), I added the path to CONNFILE to the mapping. This allowed me to find the path to this file when starting a new session.
  2. Additionally, I fixed the kernel restart when another session is created for it. The problem was that when creating an additional session, the KS was rewritten without kernelspec_path. I deleted this rewriting.

Confirmation of functionality

Screencast.from.2024-12-11.15-07-36.mp4

@rakhmaevao
Copy link
Author

It seems the tests are already broken. Will we be able to merge my PR or do I need to fix the tests?

@davidbrochart

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

Successfully merging this pull request may close these issues.

1 participant