Repository navigation
Clean up Python pool-related codes and remove emscriptenSetup from Pyodide bundle - #8360
Conversation
There was a problem hiding this comment.
Superseded by the review of
4390d924.
This review, of e2bfdea1
💬 Approved with comments — The refactor is clean. One WARNING about unrelated lockfile changes that downgrade hermetic_launcher; no blocking issues.
Findings: 1 warning (1 is an inline comment on the diff)
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
🔧 Fix with your agent
Paste the following into your coding agent to investigate and fix these issues.
Fix the following code review issues found in pull request #8360.
Before making changes, review each issue and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g., the fix would require disproportionate changes
for minimal ROI, or the finding is factually incorrect), explain why
- If you need to clarify something before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
## WARNING (1)
### [Code Quality] Unrelated MODULE.bazel.lock changes downgrade hermetic_launcher (0.0.17 to 0.0.16) and bump aspect_tools_telemetry, with no MODULE.bazel change behind them.
- **File:** MODULE.bazel.lock:145
📋 Code Quality: ⚠️ 1 warning
The refactor is coherent; the lockfile carries unrelated dependency changes, including a downgrade.
Recommendation: 📝 Minor Comments
- [WARNING] Unrelated MODULE.bazel.lock changes downgrade hermetic_launcher (0.0.17 to 0.0.16) and bump aspect_tools_telemetry, with no MODULE.bazel change behind them. (
MODULE.bazel.lock:145)
View full review
MODULE.bazel.lock: the lock replaceshermetic_launcher0.0.17 with 0.0.16 andaspect_tools_telemetry0.5.1 with 0.5.2. This pull request changes noMODULE.bazelor dependency declarations, so these entries look like drift from regenerating the lock locally. Revert the file or regenerate it against the target branch.src/pyodide/internal/util.ts:9-20andsrc/pyodide/internal/python.ts:52: the comments and TODOs that explain thesetInternalErrorReporterindirection still refer to pool bundling, which no longer exists. Consider removing the indirection, or at least updating the comments.
✅ All other checks passed
🔒 Security: ✅ LGTM
No security issues found.
📖 AGENTS.md: ✅ LGTM
No issues found.
⚡ Performance: ✅ LGTM
No performance issues found.
📝 Documentation: ✅ LGTM
The src/pyodide/AGENTS.md updates match the new layout.
Reviewed commit: e2bfdea1
e2bfdea to
4390d92
Compare
There was a problem hiding this comment.
Superseded by the review of
f29fff92.
This review, of 4390d924
✅ Approved — This is a clean refactor that removes the unused pool code and moves emscriptenSetup into the binary. The earlier lockfile warning is resolved, and there are no new findings.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
No security issues found.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
The MODULE.bazel.lock drift from the last review is no longer in the diff. The relocated modules are picked up by the pyodide_static globs. pyodide-internal:* is external in the new pyodide.asm.js esbuild rule. The stack-trace file-name check matches the new bundle output name. The comments about pool bundling in util.ts/python.ts are still stale; the review body covers them.
⚡ Performance: ✅ LGTM
This is a build and module-path refactor with no runtime hot-path changes.
📝 Documentation: ✅ LGTM
The src/pyodide/AGENTS.md updates match the new layout.
Reviewed commit: 4390d924
There was a problem hiding this comment.
Superseded by the review of
cdc54495.
This review, of f29fff92
✅ Approved — This is a clean refactor, and the bundle metadata update since the last review is consistent with the dependency file. There are no new findings.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
checkCallee still trusts only frames from the bundle's pyodide.asm module. Because pyodide-internal:* is external in the bundle build, the internal:unsafe-eval import stays in the binary. Bundle integrity is still pinned with SHA-256 hashes.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
In build/python_metadata.bzl, the backport numbers and integrity hashes match the bundle file names in build/deps/pyodide.MODULE.bazel. No other leftover references to pool/ or the old generated/pyodide.asm paths remain under src/pyodide.
⚡ Performance: ✅ LGTM
This is a build and module-path refactor with no runtime hot-path changes.
📝 Documentation: ✅ LGTM
The src/pyodide/AGENTS.md updates match the new layout.
Reviewed commit: f29fff92
f29fff9 to
cdc5449
Compare
There was a problem hiding this comment.
Superseded by the review of
45f1885b.
This review, of cdc54495
💬 Approved with comments — This is a clean refactor, and the regenerated lock file matches the pinned Pyodide bundles. The only note is an INFO: the lock file also changes dependencies that have nothing to do with Pyodide.
Findings: 1 info (1 is an inline comment on the diff)
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
📋 Code Quality: 💬 1 info
The refactor is consistent. The regenerated lock file also changes dependencies that have nothing to do with Pyodide.
Recommendation: 💬 Optional Nits
- [INFO] MODULE.bazel.lock downgrades hermetic_launcher (0.0.17 → 0.0.16) and adds aspect_tools_telemetry 0.5.2, neither related to this change. (
MODULE.bazel.lock:145)
View full review
The pyodide_*.capnp.bin names and integrity hashes in MODULE.bazel.lock match build/deps/pyodide.MODULE.bazel and build/python_metadata.bzl. The import paths, the bundle target outputs and the checkCallee module name all line up across the changed files.
Besides the Pyodide entries, the lock file also changes three other dependencies:
- It bumps capnproto to
734d00f, which brings the lock in line withbuild/deps/gen/deps.MODULE.bazel. - It adds
aspect_tools_telemetry0.5.2. - It downgrades
hermetic_launcherfrom 0.0.17 to 0.0.16.
Nothing in this repository pins those last two modules, so their changes probably come from regenerating the lock on an older base. Regenerating it on current main would keep this pull request to the Pyodide entries.
Thanks to @hoodmane for the comment wording suggestion on src/pyodide/bundle/esbuild.config.mjs:6.
✅ All other checks passed
🔒 Security: ✅ LGTM
The bundle integrity hashes are still pinned, and checkCallee still trusts only the bundle's pyodide.asm module.
📖 AGENTS.md: ✅ LGTM
The src/pyodide/AGENTS.md updates match the new layout.
⚡ Performance: ✅ LGTM
This changes only the build and module paths; no hot-path code changes at runtime.
📝 Documentation: ✅ LGTM
No issues found.
Reviewed commit: cdc54495
cdc5449 to
45f1885
Compare
There was a problem hiding this comment.
💬 Approved with comments — This is a clean refactor, and the pinned Pyodide bundle hashes are consistent across the build files. The only note is an INFO: the lock file also changes dependencies unrelated to Pyodide.
Findings: 1 info
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
📋 Code Quality: 💬 1 info
The refactor is consistent across the build rules and import paths. One INFO note remains: lock-file changes unrelated to Pyodide.
Recommendation: 💬 Optional Nits
- [INFO] MODULE.bazel.lock downgrades hermetic_launcher (0.0.17 → 0.0.16) and adds aspect_tools_telemetry 0.5.2, neither related to this change. (
MODULE.bazel.lock:145)
View full review
- Lock file (
MODULE.bazel.lock:145): besides the Pyodide entries and the capnproto bump, the lock also downgradeshermetic_launcher(0.0.17 → 0.0.16) and addsaspect_tools_telemetry0.5.2. Nothing in this change needs either one. They most likely come from regenerating the lock on an older base. checkCalleeandprepareStackTraceboth usepyodideRuntime-internal:pyodide.asm, which matches the bundle's module name inpython_bundles.bzlandpyodide.asm.d.ts.patch_pyodide_asm.tsimportspyodide-internal:builtin_wrappers. That module is marked external in the bundle config, so it is resolved at runtime.- Nothing outside the changed files still references the removed
internal/poolpaths.
✅ All other checks passed
🔒 Security: ✅ LGTM
The bundle integrity hashes are still pinned and agree across the build files. checkCallee trusts only the pyodideRuntime-internal:pyodide.asm glue module.
📖 AGENTS.md: ✅ LGTM
The src/pyodide/AGENTS.md updates match the new layout.
⚡ Performance: ✅ LGTM
Only the build and module-resolution paths change; no runtime hot path is affected.
📝 Documentation: ✅ LGTM
No issues found.
Reviewed commit: 45f1885b
On top of #8229.
This PR removes Python pool related codes
/internal/pool, which we didn't implement in the end. This gives us a following improvement:Previously,
emscriptenSetup.jswas bundled into the Pyodide bundle, and any changes there required Pyodide bundle update. Now they are linked statically into the workerd binary, so we don't need to update the bundle except for when we (1) update Pyodide version, or (2) when we add a new asm.js patch.