Skip to content

[release/13.4] Remove 'aspire new aspire-starter' step from CLI archive verifier - #17646

Merged
Mitch Denny (mitchdenny) merged 1 commit into
release/13.4from
mitchdenny/mitchdenny-remove-starter-verifier-step
May 29, 2026
Merged

Mitch Denny (mitchdenny) merged 1 commit into
release/13.4from
mitchdenny/mitchdenny-remove-starter-verifier-step

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

The signed-build CLI archive verifier (eng/scripts/verify-cli-archive.ps1) was running aspire new aspire-starter after extracting the archive. Its docstring claimed this exercised "template engine + bundle self-extraction without requiring a NuGet restore" — but that claim is wrong. aspire new resolves template versions via TemplateNuGetConfigService.ResolveTemplatePackageAsync, which always queries a NuGet feed.

Why it used to work

On release branches, this step only ever passed by accident. Pre-#17528, release-branch builds were mis-baked with AspireCliChannel=stable. With a stable identity channel, NewCommand.ResolveCliTemplateVersionAsync routes the lookup to nuget.org (the stable channel maps * → nuget.org), where a previously-shipped Aspire.ProjectTemplates version was always available. So the verifier appeared to succeed, but it was actually depending on:

  1. nuget.org being reachable from the build agent.
  2. A stable Aspire.ProjectTemplates version having already been published to nuget.org.

Why it now fails

#17528 corrected release-branch builds to bake AspireCliChannel=staging (so dogfood drops aren't mis-identified as stable). With a staging identity channel, the implicit selection in NewCommand (see ResolveCliTemplateVersionAsync, NewCommand.cs:333-345) now picks the staging channel, which maps Aspire* to a SHA-specific darc-pub feed (or the shared daily feed). That feed is not reachable from the 1ES signed-build agent, so the lookup returns nothing and the verifier fails with:

❌ No template versions were found. Please check your internet connection or NuGet source configuration.

This is the same egress reason the TypeScript starter check was already removed for in #17274 (tracked in #17345).

Change

  • Drop the Test-CSharpStarterProject invocation and helper from eng/scripts/verify-cli-archive.ps1, with a comment explaining the rationale.
  • Drop the matching assertion in VerifyCliArchivePowerShellTests.cs.
  • Leave the fake aspire new handler in FakeArchiveHelper alone — it's harmless mock code and avoids unnecessary diff churn.

The verifier still covers archive layout (sidecar contract for per-RID archives), CLI extraction, and aspire --version execution. Re-adding meaningful starter coverage in the signed-build verifier requires either an internal NuGet mirror configured on the agent or a no-network template path.

Fixes the internal AzDO build break introduced by #17528.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes (existing VerifyCliArchive_AcceptsCleanPerRidArchive adjusted; sidecar tests unaffected).
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No

The signed-build verifier ran 'aspire new aspire-starter' after extracting
the CLI archive, claiming to exercise 'template engine + bundle
self-extraction without requiring a NuGet restore'. That claim was wrong:
'aspire new' resolves template versions via
TemplateNuGetConfigService.ResolveTemplatePackageAsync, which always
queries a NuGet feed.

The step only ever succeeded on release branches because builds were
mis-baked with AspireCliChannel=stable, which routed the implicit
identity-channel lookup to nuget.org and found a previously-shipped
Aspire.ProjectTemplates version. Once #17528 corrected the release-branch
builds to bake AspireCliChannel=staging, the identity channel switched to
a staging feed that is not reachable from the 1ES signed-build agent, and
the step started failing with 'No template versions were found' in the
internal build pipeline.

This is the same egress reason the TypeScript starter check was already
removed for (#17274, tracked in #17345). Re-adding meaningful starter
coverage in the signed-build verifier requires either an internal NuGet
mirror or a no-network template path.

Drop the step (and the corresponding test assertion); the verifier still
covers archive layout, sidecar contract, and 'aspire --version'
execution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 29, 2026 02:13
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17646

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17646"

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.

Pull request overview

Backport to release/13.4 that removes the aspire new aspire-starter step from the signed-build CLI archive verifier. The step depended on NuGet feed reachability (template lookup goes through TemplateNuGetConfigService.ResolveTemplatePackageAsync), which broke after #17528 corrected release-branch builds to bake AspireCliChannel=staging — the staging feed is unreachable from the 1ES signed-build agent.

Changes:

  • Remove Test-CSharpStarterProject helper and its invocation from verify-cli-archive.ps1, replaced with an explanatory comment.
  • Update docstring to drop the starter creation step.
  • Drop the corresponding assertion in VerifyCliArchivePowerShellTests.cs.
Show a summary per file
File Description
eng/scripts/verify-cli-archive.ps1 Removes the C# starter project test step and helper; adds a rationale comment.
tests/Aspire.Acquisition.Tests/Scripts/VerifyCliArchivePowerShellTests.cs Removes the assertion checking starter-project success output.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@mitchdenny
Mitch Denny (mitchdenny) merged commit d8c4e96 into release/13.4 May 29, 2026
311 checks passed
@mitchdenny
Mitch Denny (mitchdenny) deleted the mitchdenny/mitchdenny-remove-starter-verifier-step branch May 29, 2026 02:37
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone May 29, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

docs_required → already documented by name

Triggered signals (1): pr_body_has_cli_flag_mention

Evidence: The PR body mentions aspire --version (hint: "action, and aspire --version execution") — this is the existing version flag, not a new flag being introduced.

Per-signal documentation coverage:

  • pr_body_has_cli_flag_mention → aspire --version is already documented in src/frontend/src/content/docs/reference/cli/commands/aspire.mdx line 26: "The following options are available when aspire is used by itself, without specifying a command. For example, aspire --version."

This PR is a pure CI/build-script change (only_test_or_build_changes: true) that removes a non-working aspire new aspire-starter verification step from eng/scripts/verify-cli-archive.ps1. No user-facing CLI behavior, flags, or documented features changed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants