Skip to content

feat(playground): allow overwriting published package bundles - #12329

Open
Timothee Guerin (timotheeguerin) wants to merge 5 commits into
microsoft:mainfrom
timotheeguerin:feat/playground-upload-overwrite
Open

Timothee Guerin (timotheeguerin) wants to merge 5 commits into
microsoft:mainfrom
timotheeguerin:feat/playground-upload-overwrite

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

An incorrectly published Playground bundle currently requires manually deleting every blob for that version before republishing.

Allow recovery with:

node eng/tsp-core/scripts/upload-bundler-packages.ts --overwrite

The core publish pipeline exposes the same opt-in switch; normal publishing continues to skip existing versions. Forced uploads replace manifests and content, including standalone package assets and bundled peer dependencies.

Fixes #9717

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@azure-sdk-automation

azure-sdk-automation Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Overwritten packages retain obsolete import mappings, leaving removed exports resolvable to stale blobs.

1 open issue
What changed in this PR

Adds opt-in replacement of published Playground bundles, avoiding manual blob deletion when correcting a release.

Changes:

  • Propagates overwrite support through package, asset, and peer-dependency uploads.
  • Adds CLI flags and a core publish pipeline parameter.
  • Documents usage and records the change.
File Description
packages/​bundle-uploader/​src/​upload-browser-package.ts Allows replacing existing blobs.
packages/​bundle-uploader/​src/​index.ts Passes overwrite options through upload APIs.
packages/​bundle-uploader/​README.md Documents overwrite commands and behavior.
eng/​tsp-core/​scripts/​upload-bundler-packages.ts Adds the core CLI flag.
eng/​tsp-core/​pipelines/​publish.yml Exposes the opt-in pipeline parameter.
eng/​tsp-core/​pipelines/​jobs/​build-packages.yml Passes the parameter to the upload command.
eng/​emitters/​scripts/​upload-bundled-emitter.ts Adds standalone emitter overwrite support.
.chronus/​changes/​playground-upload-overwrite-2026-10-21.md Records the tooling enhancement.

Review effort: Balanced

Comment thread packages/bundle-uploader/src/index.ts Resolved
Copilot AI balanced review requested due to automatic review settings October 21, 2026 18:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Production blob replacement and pipeline integration need human validation because the new behavior lacks automated coverage.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no blocking issues in overwrite propagation, default behavior preservation, pipeline wiring, or package-scoped index cleanup.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 5, 2026 18:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the opt-in Playground bundle overwrite change.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 14:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

5 open issues

Review effort: Lite

Comment on lines +9 to +14
overwrite: { type: "boolean", default: false },
},
allowPositionals: true,
});

const packageRelativePath = positionals[0];
@@ -1,12 +1,20 @@
// @ts-check
import { parseArgs } from "node:util";
Comment on lines +9 to +14
const { values } = parseArgs({
options: {
overwrite: { type: "boolean", default: false },
},
});

Comment on lines +219 to +225
if (overwrite) {
for (const key of Object.keys(importMap)) {
if (key === manifest.name || key.startsWith(`${manifest.name}/`)) {
delete importMap[key];
}
}
}
conditions: {
ifNoneMatch: "*",
},
conditions: this.#overwrite ? undefined : { ifNoneMatch: "*" },

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playground package uploader script should support a flag to override existing versions

2 participants