Skip to content

Stamps PR builds with preview format: 1.43.0-pr.<build_id>+<commit_hash>#22170

Open
Benjin wants to merge 4 commits into
mainfrom
dev/benjin/previewPackage
Open

Stamps PR builds with preview format: 1.43.0-pr.<build_id>+<commit_hash>#22170
Benjin wants to merge 4 commits into
mainfrom
dev/benjin/previewPackage

Conversation

@Benjin
Copy link
Copy Markdown
Contributor

@Benjin Benjin commented May 22, 2026

Description

Adding automatic stamping to PR-built VSIXes. Now PR output will be tagged as pr and internal preview builds will be tagged as preview. All of these will VSIXes will be packaged with the --pre-release flag

This PR also moves the stamping script that was previously only in the internal pipelines to here, where it will be used for all pipelines (internal and external).

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds automated pre-release stamping and packaging support so CI-produced VSIXes can be clearly identified as PR/preview builds and packaged using VSCE’s pre-release mechanism.

Changes:

  • Added a repo-level stamping script to rewrite each extension’s package.json version into <version>-<label>.<buildId>+<shortHash>.
  • Extended the workspace runner and MSSQL packaging script to accept --preview/--pre-release and pass --pre-release through to vsce package.
  • Updated Azure Pipelines templates and the GitHub Actions workflow to stamp PR builds and package with the pre-release flag.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/workspaces.mjs Adds --preview/--pre-release parsing and forwards --pre-release during package.
scripts/stamp-prerelease-version.mjs New script to stamp pre-release versions across all extension package.json files.
extensions/mssql/scripts/package-extension.js Adds support for --pre-release and forwards it to vsce package.
build/templates/build-sql-database-projects.yml Packages SqlProj with --preview (pre-release).
build/templates/build-mssql.yml Packages MSSQL online/offline with --preview (pre-release).
build/templates/build-database-management-keymap.yml Packages keymap with --preview (pre-release).
build/templates/build-data-workspace.yml Packages Data Workspace with --preview (pre-release).
build/PullRequest.yml Stamps PR build versions before building/packaging.
.github/workflows/build-and-test.yml Stamps versions and packages with --preview during the workflow.

Comment on lines +71 to +73
- name: Stamp build as pull request version
run: |
node scripts/stamp-prerelease-version.mjs "${{ github.run_id }}" --label pr
Comment on lines 91 to 94
- name: Package extensions
run: |
npm run package
npm run package -- --preview

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

PR Changes

Category Target Branch PR Branch Difference
vscode-mssql VSIX 78764 KB 78654 KB ⚪ -110 KB ( 0% )
sql-database-projects VSIX 6309 KB 6309 KB ⚪ 0 KB ( 0% )
data-workspace VSIX 535 KB 535 KB ⚪ 0 KB ( 0% )
keymap VSIX 7 KB 7 KB ⚪ 0 KB ( 0% )

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.85%. Comparing base (a069afc) to head (df6967f).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #22170   +/-   ##
=======================================
  Coverage   74.85%   74.85%           
=======================================
  Files         399      399           
  Lines      123549   123549           
  Branches     7465     7465           
=======================================
  Hits        92479    92479           
  Misses      31070    31070           
Flag Coverage Δ
data-workspace 77.10% <ø> (ø)
mssql 74.52% <ø> (ø)
sqlproj 77.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants