Skip to content

Conversation

SsaiSanjanna03
Copy link

@SsaiSanjanna03 SsaiSanjanna03 commented Apr 27, 2025

Fixes https://github.com/jupyter/notebook/issues/1750:Prevent concurrent cell executions in Jupyter Notebook.

Changes:

  • Updated packages/notebook/src/actions.tsx to use metadata['running'] to block execution if a cell is running, logging "Cell is already running".
  • Added UI test in ui-tests/tests/runcell.spec.ts to verify:
    • Single output for rapid cell executions.
    • Correct variable state (i == 1).
    • Console log for ignored requests.

Testing:

  • Manually verified by rapid Shift+Enter on a long-running cell.

Related:

Ready for review.

Copy link
Contributor

Binder 👈 Launch a Binder on branch SsaiSanjanna03/notebook/prevent_cell__re_execute_issue1750

@krassowski
Copy link
Member

I wonder if this should be behind an option as concurrent re-runing of a cell is sometimes intended, especially with async kernels.

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.

2 participants