Skip to content

fix: debug and fix WASM marimo test selectors (approach A)#530

Closed
paddymul wants to merge 1 commit into
mainfrom
fix/marimo-wasm-test-approach-a
Closed

fix: debug and fix WASM marimo test selectors (approach A)#530
paddymul wants to merge 1 commit into
mainfrom
fix/marimo-wasm-test-approach-a

Conversation

@paddymul

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: micropip.install("buckaroo", keep_going=True) fails in Pyodide because fastparquet (a C extension) has no pure-Python wheel. Despite keep_going=True, the install raises a ValueError, crashing the first cell and cascading failures to all downstream cells that use BuckarooWidget.
  • WASM notebook fix: Install buckaroo's pure-Python deps explicitly, then install buckaroo with deps=False, and create a minimal fastparquet stub module (types.ModuleType) so buckaroo's import chain succeeds. Applied to all three WASM notebooks.
  • Python fix: Make fastparquet import optional in buckaroo/serialization_utils.py via try/except ImportError, so future releases don't need the stub workaround.
  • Test fix: Replace waitFor with fixed timeout (which was too short at 60s) with a polling loop that waits up to 240s for content + 60s for widgets, with console log capture for CI debugging.

Test plan

  • Ran WASM marimo Playwright test locally 3 times -- all pass in ~18-22s
  • CI should pass with the updated WASM HTML (needs bash scripts/marimo_wasm_output.sh buckaroo_simple.py run in CI or pre-committed HTML)
  • Verify existing Python tests still pass (fastparquet import is backward-compatible)

🤖 Generated with Claude Code

…ility in Pyodide

The WASM Playwright test timed out because micropip.install("buckaroo")
failed on fastparquet (C extension with no pure-Python wheel for Pyodide).
This cascaded to all downstream cells, preventing widget rendering.

Three-part fix:
- WASM notebooks: install deps manually with deps=False, create a minimal
  fastparquet stub module so buckaroo's import chain succeeds
- serialization_utils.py: make fastparquet import optional (try/except)
  for forward compatibility when the next release is published to PyPI
- Test: replace fixed-timeout waitFor with polling loop, increase timeout
  to 300s, add console log capture for CI debugging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@paddymul

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #532 (uses real Pyodide-bundled fastparquet)

@paddymul paddymul closed this Feb 21, 2026
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