Repository navigation
Fix Python Playground fallback for blocked public downloads - #12068
Draft
Libba Lawrence (l0lawrence) wants to merge 8 commits into
Draft
Libba Lawrence (l0lawrence) wants to merge 8 commits into
Libba Lawrence (l0lawrence) wants to merge 8 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
commit: |
Contributor
|
All changed packages have been documented.
Show changes
|
Contributor
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>
This branch has not been deployed
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.
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.