Validate TypeScript CLI archive layout#17274
Conversation
Extend the shipped CLI archive verifier to assert the bundled AppHost server layout and exercise the TypeScript starter output. Add acquisition test coverage with a synthetic bundle-shaped archive so the PowerShell verifier can be run without signed shipping artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Extends the CLI archive verifier (eng/scripts/verify-cli-archive.ps1) to validate bundle layout (managed AppHost server, dashboard wwwroot, DCP) and the TypeScript starter flow against shipped archives, plus adds a test that exercises the script end-to-end using a synthetic bundle-shaped archive.
Changes:
- Add
Test-BundleLayout,Test-CSharpStarterProject,Test-TypeScriptStarterProject, and supporting helpers (Get-ArchiveRoot,Get-ArchiveRidFamily,Get-ExecutableFileName) to the verifier and wire them into the main flow. - Extend
FakeArchiveHelperwithCreateFakeBundleArchiveAsyncthat produces a bundle-shaped archive (CLI stub,managed/aspire-managed,managed/wwwroot,dcp/dcp) plus mock CLI/managed/DCP scripts emulatingaspire newfor both starters. - Add
VerifyCliArchivePowerShellTests(non-Windows) and aScriptPaths.VerifyCliArchivePowerShellentry to drive the script against the synthetic archive.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/scripts/verify-cli-archive.ps1 | Adds bundle-layout validation, TypeScript starter step, and archive-root discovery helpers. |
| tests/Aspire.Acquisition.Tests/Scripts/Common/FakeArchiveHelper.cs | Adds synthetic bundle-shaped archive builder with mock CLI/managed/DCP scripts. |
| tests/Aspire.Acquisition.Tests/Scripts/Common/ScriptPaths.cs | Registers verify-cli-archive.ps1 path for tests. |
| tests/Aspire.Acquisition.Tests/Scripts/VerifyCliArchivePowerShellTests.cs | New end-to-end test invoking the verifier against the synthetic archive. |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17274Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17274" |
Use switch output directly in Get-ArchiveRidFamily so verify-cli-archive.ps1 parses under pwsh in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
❓ CLI E2E Tests unknown — 94 passed, 0 failed, 2 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26128901539 |
PR Testing ReportPR Information
CLI Version Verification
Changes AnalyzedThe PR updates Test Scenarios ExecutedScenario 1: Dogfood CLI install and version checkObjective: Verify the PR dogfood artifact is available and corresponds to the current PR head. Result: Passed Evidence:
Scenario 2: CI archive layout check against new verification expectationsObjective: Compare the actual Result: Failed Expected by the updated script:
Observed in the downloaded CI archive: I downloaded The post-install dogfood Scenario 3: C# starter creationObjective: Verify the PR CLI can still create the C# starter covered by the verification script. Steps:
Result: Passed Scenario 4: TypeScript starter creation and generated SDK layoutObjective: Verify the PR CLI can create the TypeScript starter output that the updated verification script checks. Steps:
Result: Passed Summary
Overall ResultIssue found. The PR CLI can create both C# and TypeScript starter projects, but the actual |
Description
The shipped CLI archive verifier only exercised the C# starter path, so it could miss archive layout problems that break TypeScript AppHosts. This change extends the verifier to assert the bundled AppHost server layout directly and to run the TypeScript starter flow against the extracted archive.
The verifier now checks for the managed AppHost server, dashboard web assets, and DCP in the extracted CLI archive before installing the CLI, then validates both
aspire-starterandaspire-ts-starteroutput. The acquisition test uses a synthetic bundle-shaped archive so the PowerShell script can be tested end-to-end without requiring signed shipping artifacts.Fixes: #17040
Checklist
<remarks />and<code />elements on your triple slash comments?