Skip to content

Deduplicate package extraction between verify-nupkgs and IntegrationTestBuild#15554

Merged
nohwnd merged 2 commits into
microsoft:mainfrom
nohwnd:investigate-package-unzip
Mar 24, 2026
Merged

Deduplicate package extraction between verify-nupkgs and IntegrationTestBuild#15554
nohwnd merged 2 commits into
microsoft:mainfrom
nohwnd:investigate-package-unzip

Conversation

@nohwnd
Copy link
Copy Markdown
Member

@nohwnd nohwnd commented Mar 24, 2026

Aligns \�ng/verify-nupkgs.ps1\ extraction to use the same directory convention as \IntegrationTestBuild.cs, eliminating duplicate extraction of 5 NuGet packages + VSIX.

Before: Packages extracted twice:

  • \�rtifacts/tmp/{Config}/{BaseName}\ (by verify-nupkgs during pack)
  • \�rtifacts/tmp/{Config}/extractedPackages/{FileName}\ (by IntegrationTestBuild during test init)

After: verify-nupkgs extracts to \�xtractedPackages/{FileName}\ and writes .cache\ markers. IntegrationTestBuild detects the cache and skips re-extraction.

IntegrationTestBuild retains its own extraction logic as a fallback (e.g., on Linux where \�uild.cmd -pack\ isn't run, or when running tests without packing first).

Closes #15456

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

…estBuild

Change verify-nupkgs.ps1 to extract packages into the same directory that
IntegrationTestBuild.cs expects (artifacts/tmp/{Config}/extractedPackages/
{PackageFileName}), and write .cache marker files after verification so
IntegrationTestBuild detects the pre-extracted packages and skips
re-extraction during test initialization.

This eliminates the duplicate extraction of 5 NuGet packages + VSIX that
previously happened once during 'build.cmd -pack' (verify-nupkgs.ps1) and
again during test assembly initialization (IntegrationTestBuild.cs).

Closes microsoft#15456

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 24, 2026 06:10
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

Aligns NuGet/VSIX extraction paths between eng/verify-nupkgs.ps1 and IntegrationTestBuild.cs to avoid extracting the same packages twice during pack + integration test initialization.

Changes:

  • Update verify-nupkgs.ps1 to extract into artifacts/tmp/{Config}/extractedPackages/{PackageFileName} (matching IntegrationTestBuild conventions).
  • Derive verification keys from the package file name (since extraction directory naming changed).
  • Write per-package .cache marker files to enable IntegrationTestBuild to skip redundant extraction.

Comment thread eng/verify-nupkgs.ps1 Outdated
Comment thread eng/verify-nupkgs.ps1
… exists

- Use 'o' (round-trip/ISO 8601) format for cache marker timestamps
  in both verify-nupkgs.ps1 and IntegrationTestBuild.cs for
  deterministic cross-runtime comparison
- Add New-Item -Force to ensure extractedPackages directory exists

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nohwnd nohwnd added the 🚢 Ship it! Add to PRs where owner approves automated PR, but cannot approve because they "wrote it". label Mar 24, 2026
@nohwnd nohwnd enabled auto-merge (squash) March 24, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚢 Ship it! Add to PRs where owner approves automated PR, but cannot approve because they "wrote it".

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Where do we unzip and copy packages?

3 participants