Repository navigation
Isolate playground builds from deployment credentials - #27839
Conversation
The WebAssembly test and npm publication jobs select `node-version: 24`, so the Node.js and bundled `npm` versions can change between runs without a workflow change. Pin both selectors to `24.19.0`, keeping the existing Node major and publication permissions. The existing Renovate GitHub Actions manager continues to track these inputs. Related: #27838, #27839, and #27844 pin the playground runtimes; #27842 covers the `prek`-managed runtime. astral-sh/packse#326 makes the corresponding exact Node.js 24 pin for formatter CI. Co-authored-by: zaniebot <[email protected]>
| test -f playground/ruff/dist/index.html | ||
| # Pages treats these paths as server-side code, not static assets. | ||
| test ! -e playground/ruff/dist/_worker.js | ||
| test ! -e functions | ||
| if [[ -n "$(find playground/ruff/dist ! -type f ! -type d -print -quit)" ]]; then | ||
| echo "Playground artifacts must contain only regular files and directories" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
These checks are a little goofy but I guess are inoffensive?
There was a problem hiding this comment.
Can we add a comment explaining why they're there? Like, what's the motivation. It's otherwise very likely that someone will remove them in the future (or we make a change that breaks them but we'll never know because they still pass and we don't know what this thing is even supposed to do)
| test -f playground/ty/dist/index.html | ||
| test -f playground/ty/dist/assets/pyodide.asm.mjs | ||
| test -f playground/ty/dist/assets/pyodide.asm.wasm | ||
| test -f playground/ty/dist/assets/pyodide-lock.json | ||
| test -f playground/ty/dist/assets/python_stdlib.zip | ||
| # Pages treats these paths as server-side code, not static assets. | ||
| test ! -e playground/ty/dist/_worker.js | ||
| test ! -e functions | ||
| if [[ -n "$(find playground/ty/dist ! -type f ! -type d -print -quit)" ]]; then | ||
| echo "Playground artifacts must contain only regular files and directories" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
| test -f playground/ruff/dist/index.html | ||
| # Pages treats these paths as server-side code, not static assets. | ||
| test ! -e playground/ruff/dist/_worker.js | ||
| test ! -e functions | ||
| if [[ -n "$(find playground/ruff/dist ! -type f ! -type d -print -quit)" ]]; then | ||
| echo "Playground artifacts must contain only regular files and directories" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Can we add a comment explaining why they're there? Like, what's the motivation. It's otherwise very likely that someone will remove them in the future (or we make a change that breaks them but we'll never know because they still pass and we don't know what this thing is even supposed to do)
Pinning `cloudflare/wrangler-action` does not pin the `wrangler@4` package it installs during deployment. Install Wrangler from a dedicated, committed lockfile with lifecycle scripts disabled, then invoke that local executable directly. Require `npm>=11.10.0` with `engines.npm` and `engine-strict` so older clients cannot silently ignore the seven-day `min-release-age` policy, and pin Node.js to `24.19.0` at the install sites. Both playgrounds now use the reviewed dependency tree already recorded for the playground API, and Cloudflare credentials are passed only to the deployment command. Related: #27839 isolates the playground builds from deployment credentials, and #27844 enforces the corresponding `npm` floor in the existing package roots. astral-sh/ruff-vscode#1152 and astral-sh/ty-vscode#526 likewise give credentialed publishers their own locked toolchains. --------- Co-authored-by: zaniebot <[email protected]>
Marketplace publishing already consumes prebuilt VSIX files, but each publisher installs the extension's complete development dependency tree. Give `scripts/publish` an independent lockfile containing the existing `@vscode/vsce` and `ovsx` versions, and install it with dependency lifecycle scripts disabled. Require `npm>=11.10.0` with `engines.npm` and `engine-strict`, and apply a seven-day `min-release-age` to new resolutions. Invoke the locked binaries directly so publishing cannot fall back to an unpinned `npx` download. The packaging jobs and published VSIX artifacts are unchanged. Related: astral-sh/ty-vscode#526 applies the same publisher split to ty, while #1151 sets the install-script policy for the full extension project. #1153 applies the matching seven-day policy to the full extension project. astral-sh/ruff#27839 isolates playground builds from their publisher. --------- Co-authored-by: Zanie Blue <[email protected]>
Marketplace publishing already consumes prebuilt VSIX files, but each publisher installs the extension's complete development dependency tree. Give `scripts/publish` an independent lockfile containing the existing `@vscode/vsce` and `ovsx` versions, and install it with dependency lifecycle scripts disabled. Require `npm>=11.10.0` with `engines.npm` and `engine-strict`, and apply a seven-day `min-release-age` to new resolutions. Invoke the locked binaries directly so publishing cannot fall back to an unpinned `npx` download. The packaging jobs and published VSIX artifacts are unchanged. Related: astral-sh/ruff-vscode#1152 applies the same publisher split to Ruff, while #525 sets the install-script policy for the full extension project. #527 applies the matching seven-day policy to the full extension project. astral-sh/ruff#27839 isolates playground builds from their publisher. --------- Co-authored-by: Zanie Blue <[email protected]>
The playground release jobs run
npm run checkand the builds on the runner that later receivesCF_API_TOKEN. Move those commands into unprivileged jobs and pass named, digest-verified static artifacts to freshrelease-playgroundjobs. The publishers reject symlinks, special files, and Pages server-code entrypoints before deployment. This isolates the playground build tools; it does not remove the publisher's Wrangler dependency. Locking that tooling is handled separately in #27838.Related: astral-sh/ruff-vscode#1152 and astral-sh/ty-vscode#526 reduce the dependency trees installed by the marketplace publishers.