Skip to content

Revert "Fix 13.4 staging CLI dropping nuget.config without Aspire package source mapping (#17528)" - #17565

Closed
mitchdenny wants to merge 1 commit into
release/13.4from
mitchdenny/revert-6a823558-on-13-4
Closed

Revert "Fix 13.4 staging CLI dropping nuget.config without Aspire package source mapping (#17528)"#17565
mitchdenny wants to merge 1 commit into
release/13.4from
mitchdenny/revert-6a823558-on-13-4

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

Reverts #17528 (commit 6a82355) on release/13.4.

Checklist

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

…kage source mapping (#17528)"

This reverts commit 6a82355.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 27, 2026 22:52
@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 -- 17565

Or

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

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

This PR reverts the changes from #17528 on release/13.4, removing the earlier fixes intended to prevent staging builds of the Aspire CLI from behaving like stable and dropping a nuget.config without Aspire package source mapping.

Changes:

  • Reverts staging CLI routing logic in PackagingService so staging identity again defaults to quality=Both (shared-feed routing).
  • Reverts pipeline channel detection back to preferring DotNetFinalVersionKind=releasestable before release-branch detection.
  • Removes/updates the associated unit-test scaffolding and regression coverage introduced with the original fix.
Show a summary per file
File Description
tests/Aspire.Cli.Tests/Utils/CliTestHelper.cs Removes test-only injection used to force deterministic staging identity quality behavior.
tests/Aspire.Cli.Tests/Packaging/PackagingServiceTests.cs Updates construction and removes the regression test that validated stable-shaped staging identity routing.
src/Aspire.Cli/Packaging/PackagingService.cs Reverts staging identity version-shape logic; staging identity now defaults to Both in the default-quality selection.
eng/pipelines/templates/build_sign_native.yml Reverts CLI channel auto-detection ordering so versionKind=='release' maps to stable before checking for release branches.
eng/pipelines/azure-pipelines.yml Removes the runtime pipeline parameter plumbing that supported overriding the baked CLI channel.

Copilot's findings

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

Comment on lines 133 to 137
var stagingFeatureEnabled = _features.IsFeatureEnabled(KnownFeatures.StagingChannelEnabled, false);
if (stagingFeatureEnabled || stagingChannelConfigured || stagingChannelRequested || stagingIdentityChannel)
{
// Default quality selection rules (per staging entry point):
// - Explicit user opt-in (`stagingChannelConfigured`, `stagingChannelRequested`): Both.
// The user picked staging deliberately; they get the broadest matching window.
// - `stagingFeatureEnabled` only (no other staging signal): Stable. Preserves the
// pre-existing behavior of the staging feature flag.
// - `stagingIdentityChannel` (the running CLI itself self-identifies as staging):
// depends on the CLI build's version shape.
// * Stable-shaped (e.g. "13.4.0", produced during release stabilization when
// StabilizePackageVersion=true) → Stable. The shared dotnet9 daily feed only
// carries prerelease-tagged 13.4.0-preview.* builds, so defaulting to Both
// would route Aspire.* to dotnet9 and fail to resolve the just-shipped
// stable-shaped packages — the bug from
// https://github.com/microsoft/aspire/issues/17527. Routing to Stable selects
// the SHA-derived darc-pub-microsoft-aspire-<hash> feed, where the
// stabilizing build's packages actually live.
// * Prerelease-shaped (e.g. "13.4.0-preview.1.123") → Both. SHA-specific darc
// feeds are only created for stable release-branch builds, so prerelease CLIs
// must use the shared daily feed; the historical Both default is correct.
PackageChannelQuality defaultQuality;
if (stagingIdentityChannel)
{
// When the running CLI's identity itself is staging, the synthesized channel's
// quality MUST follow the CLI build's version shape regardless of how synthesis
// was triggered. `init` and many other commands pass requestedChannelName=staging
// when identity is staging, so checking `stagingChannelRequested` first would
// short-circuit this path and re-introduce the #17527 misroute on stabilizing
// builds.
defaultQuality = _isStableShapedCliVersion()
? PackageChannelQuality.Stable
: PackageChannelQuality.Both;
}
else if (stagingChannelConfigured || stagingChannelRequested)
{
defaultQuality = PackageChannelQuality.Both;
}
else
{
defaultQuality = PackageChannelQuality.Stable;
}

var defaultQuality = stagingChannelConfigured || stagingChannelRequested || stagingIdentityChannel ? PackageChannelQuality.Both : PackageChannelQuality.Stable;
var stagingChannel = CreateStagingChannel(defaultQuality);
Comment on lines 108 to +111
} elseif ($versionKind -eq 'release') {
$channel = 'stable'
} elseif ($sourceBranch -match '^refs/heads/(release|internal/release)/') {
$channel = 'staging'
@mitchdenny mitchdenny closed this May 27, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone May 27, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 27, 2026
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.

2 participants