Repository navigation
Fix Python Playground fallback for blocked public downloads - #12068
Libba Lawrence (l0lawrence) wants to merge 8 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
commit: |
|
All changed packages have been documented.
Show changes
|
Python emitter diffBaseline No changes to generated output. Rendered diff: inline on the run summary, or the emitter-diff-html artifact. Informational check (eng/emitter-diff); does not block the PR. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
You can try these changes here
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…llback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…wnloads fail Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Hi @Libba Lawrence (@l0lawrence). Your PR has had no update for 14 days and it is marked as a stale PR. If it is not updated within 14 additional days, the PR will automatically be closed. The |
|
Hi @Libba Lawrence (@l0lawrence). The PR will be closed since the PR has no update for 28 days. If this is still relevant please reopen. |
Why
Python Playground generation downloads Pyodide from jsDelivr and Python dependencies through public package services. Those browser-side requests can fail on internal Microsoft networks. Build-time pip index settings alone do not affect those requests.
Approach
browser-runtime.ts. Reuse an initialized runtime when package installation fails, and preserve both errors if recovery also fails.build:playgroundcommand and dedicated asset builder. Normal wheel builds and Node/tsp-client generation remain unchanged.tspconfig, Playground state, or README changes; one PythonfixChronus entry.Validation
DemoServiceClientwith 19 files for public success, blocked bootstrap JS, a bootstrap response with no runtime export, blocked lockfile, and blocked public Python packages. Public success made no fallback requests, and initialized runtimes were reused. Runtime and package fixtures were served from the existing local assets rather than downloaded from public registries.Known limitations
pyodide.asm.wasmis blocked, Pyodide 0.26.2 logswasm instantiation failed!without rejecting its initialization promise. The failure-only fallback therefore cannot start, and generation remains pending. This was reproduced in a real browser and confirmed in the pinned runtime source. The user explicitly chose to retain failure-only behavior and document this limitation rather than add a startup timeout. This PR does not fix that hang.Failed to fetchunhandled-rejection console errors during the failed public attempt.