Repository navigation
test(e2e): wait for the notebook kernel before clicking Run All - #581
Merged
Merged
Conversation
On notebook open, the Deepnote controller registers only after the interpreter resolves, which waits on the Python extension and can finish after the editor and its Run All button are up. A Run All click in that window finds no kernel, so VS Code opens its kernel picker and holds the run on it. Nothing answers the picker, the first attempt times out waiting for output, and Mocha's retry then fails with "Run All button did not appear". This made the execution shard flaky on main and unrelated PRs. clickRunAll now waits until the notebook toolbar's kernel label names a kernel: the same selected-or-only kernel VS Code resolves Run All against. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CqyiyR2czV5oi4Y4bu76FS
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #581 +/- ##
=====================================
Coverage 38% 38%
=====================================
Files 822 822
Lines 41098 41098
Branches 9044 9044
=====================================
Hits 15622 15622
Misses 23404 23404
Partials 2072 2072 🚀 New features to boost your workflow:
|
m1so
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clickRunAllnow waits until the notebook toolbar names a kernel before it clicks Run All. This fixes the intermittentE2E (execution)failureTimeoutError: notebook "Run All" button did not appear or could not be clicked. It has hit main (2026-10-17) and unrelated PRs: #580 (failed 3 retries, run),renovate/node-24.x,follow-redirects,nteract-transform-vega.Root cause
On open,
registerControllerForNotebookregisters the Deepnote controller only afternotebookInterpreters.resolve()returns, and that call waits on the Python extension. On a cold runner it can finish after the editor and its Run All button are already up.VS Code 1.140 resolves Run All against the notebook's selected-or-only kernel (
getKernels(notebook).selected). When there is none, it runs_notebook.selectKerneland waits on that picker. Nothing answers the picker, so the first attempt times out waiting for output. Mocha's retry then fails with the "Run All button did not appear" error. The CI failure screenshot shows that picker open over the toolbar.I reproduced this locally with the same VS Code (1.140.0) and ChromeDriver (150.0.7871.124) as CI. The click landed at
14:03:36.766and the controller registered at14:03:36.883.The toolbar's kernel label is computed from the same
getKernels(notebook).selected. So the label naming a kernel (anything but "Select Kernel") is exactly the condition under which Run All won't open the picker.Verification
All runs were local under Xvfb, using the same commands as
e2e.yml:executionshard gave 6 passing and 1 failing, with the CI error.helloWorldfails with the CI error. With the new helper, it passes.executionshard: 7 passing, in two runs.clickRunAllcallers:agent8 passing,interpreterKernel2 passing,snapshots6 passing.Note for local E2E runs
A freshly built E2E venv currently fails the chart and SQL tests for an unrelated reason. deepnote-toolkit on Python 3.12 resolves pyarrow 26, which needs NumPy 2 (BLU-6622). CI isn't affected because it restores a cached venv. Locally, run
pip install "pyarrow<26"in the E2E venv.🤖 Generated with Claude Code
https://claude.ai/code/session_01CqyiyR2czV5oi4Y4bu76FS
Summary by CodeRabbit