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 race condition in notebook kernel association #13364

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

msujew
Copy link
Member

@msujew msujew commented Feb 7, 2024

What it does

There's a race condition in the notebook kernel association code. Whenever you open a notebook, Theia will automatically try to associate a kernel to it. However, if this notification arrives in the plugin host before the notebook open notification arrives, it will not be able to associate the kernel to the notebook - this effectively disables all cell execution for the specific notebook.

How to test

The issue can be fairly reliably reproduced by:

  1. Open a notebook and select a kernel for it
  2. Just reload the application, with the notebook being open

Previously, notebook cells weren't executing afterwards. This change should alleviate that issue.

Review checklist

Reminder for reviewers

@msujew msujew added the notebook issues related to notebooks label Feb 7, 2024
@jonah-iden
Copy link
Contributor

Thanks for the fix, i'll take a look tomorrow

Copy link
Contributor

@jonah-iden jonah-iden left a comment

Choose a reason for hiding this comment

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

Works great and looks good to me 👍

@msujew msujew merged commit c4fb1cd into master Feb 8, 2024
13 of 14 checks passed
@msujew msujew deleted the msujew/notebook-kernel-race-condition branch February 8, 2024 11:17
@github-actions github-actions bot added this to the 1.47.0 milestone Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notebook issues related to notebooks
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants