Skip to content

aspire new: staging-identity CLI should auto-register the staging channel #17121

@radical

Description

@radical

A staging-channel CLI (identity = staging) does not get the staging channel registered in PackagingService.GetChannelsAsync by default.

PackagingService only registers the staging channel when KnownFeatures.IsStagingChannelEnabled is true — i.e. when the stagingChannelEnabled feature flag is set, or configuration["channel"] == "staging". A user running a freshly downloaded staging CLI with no extra config hits neither condition.

The result: aspire new (and any other command that resolves channels) sees only { default, stable, daily } and falls back to Implicit (nuget.org). The CLI's own identity is silently ignored.

This is benign for aspire new after #17120 (it falls back to a stable nuget.org template, which restores fine), but it means staging users don't actually get the staging feed for templates or for aspire add. It should "just work" the same way daily does — the daily channel is registered unconditionally.

Suggestion

In PackagingService.GetChannelsAsync, treat CliExecutionContext.IdentityChannel == "staging" as another trigger for registering the staging channel, alongside the existing feature-flag / config triggers.

Repro

  1. Install a staging CLI: ./eng/scripts/get-aspire-cli.sh --quality staging --install-path /tmp/aspire-staging --skip-path
  2. /tmp/aspire-staging/aspire new aspire-ts-starter --name X --output . --non-interactive — note that the generated aspire.config.json has no channel pin and the SDK version comes from nuget.org rather than the staging feed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage:bot-seenAspire triage bot has seen this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions