Skip to content

Add override options for staging feed and quality in configuration schema and implement related tests#14455

Merged
joperezr merged 2 commits intodotnet:release/13.2from
joperezr:StagingChannel
Feb 12, 2026
Merged

Add override options for staging feed and quality in configuration schema and implement related tests#14455
joperezr merged 2 commits intodotnet:release/13.2from
joperezr:StagingChannel

Conversation

@joperezr
Copy link
Member

@joperezr joperezr commented Feb 11, 2026

Description

cc: @mitchdenny

Problem

The staging channel constructs a SHA-specific NuGet feed URL (darc-pub-dotnet-aspire-{hash}) for package resolution. These feeds are only created by DARC for stable-quality builds. When staging builds aren't yet marked as stable, the SHA-specific feed doesn't exist
(or is empty), causing aspire new and aspire update to fail for users on the staging channel.

Solution

When overrideStagingQuality is set to Prerelease or Both and no explicit overrideStagingFeed is provided, the staging channel now falls back to the shared dotnet9 daily feed instead of constructing a SHA-based feed. This also disables configureGlobalPackagesFolder
since package isolation isn't needed with the shared feed.

The logic: SHA-specific feeds only contain stable builds, so a non-Stable quality without an explicit feed override can only work with the shared feed — making this a natural signal rather than requiring a new config key.

How to enable

// ~/.aspire/globalsettings.json
{
"overrideStagingQuality": "Prerelease",
"features": { "stagingChannelEnabled": true }
}

Changes

  • src/Aspire.Cli/Packaging/PackagingService.cs — CreateStagingChannel() computes whether to use the shared feed based on quality + feed override state; GetStagingFeedUrl() returns the dotnet9 feed when appropriate; configureGlobalPackagesFolder is disabled for
    shared feed mode.
  • tests/Aspire.Cli.Tests/Packaging/PackagingServiceTests.cs — 4 new tests covering: Prerelease→shared feed, Both→shared feed, feed override takes precedence, and NuGet config omits globalPackagesFolder in shared feed mode.
  • extension/schemas/aspire-{global-,}settings.schema.json — Added overrideStagingFeed and overrideStagingQuality property definitions for IntelliSense support.

Rollback

Once staging builds are published as stable again, remove overrideStagingQuality from settings. The code is safe to leave in — the default quality is Stable, so the shared-feed path is never taken unless explicitly configured.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

🚀 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14455

Or

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

Copy link
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

This PR adds configuration options to address a critical issue where the staging channel fails when builds aren't marked as stable. The staging channel normally constructs SHA-specific NuGet feeds (darc-pub-dotnet-aspire-{hash}) that only exist for stable-quality builds. When staging builds are prerelease, these feeds don't exist, causing aspire new and aspire update to fail.

Changes:

  • Adds overrideStagingFeed and overrideStagingQuality configuration options with JSON schema support for IntelliSense
  • Implements automatic fallback to the shared dotnet9 daily feed when quality is Prerelease/Both and no explicit feed override is provided
  • Disables configureGlobalPackagesFolder for shared feed scenarios (package isolation not needed)
  • Provides comprehensive test coverage for all new scenarios

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
extension/schemas/aspire-settings.schema.json Added schema definitions for overrideStagingFeed (string) and overrideStagingQuality (enum: Stable/Prerelease/Both)
extension/schemas/aspire-global-settings.schema.json Added identical schema definitions for global settings file
src/Aspire.Cli/Packaging/PackagingService.cs Modified CreateStagingChannel() to compute useSharedFeed flag based on quality and feed override state; updated GetStagingFeedUrl() to return shared feed when appropriate; disabled configureGlobalPackagesFolder for shared feed mode
tests/Aspire.Cli.Tests/Packaging/PackagingServiceTests.cs Added 4 comprehensive tests covering: Prerelease quality uses shared feed, Both quality uses shared feed, explicit feed override takes precedence, and NuGet config correctly omits globalPackagesFolder in shared feed mode

Copy link
Member

@mitchdenny mitchdenny left a comment

Choose a reason for hiding this comment

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

Once we've got this in and done basic validation on the E2E scenario we should add an E2E CLI test so we can continue to automatically validate it.

@joperezr joperezr merged commit b7ad6a2 into dotnet:release/13.2 Feb 12, 2026
673 of 677 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Feb 12, 2026
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