Revert "Fix 13.4 staging CLI dropping nuget.config without Aspire package source mapping (#17528)" - #17565
Closed
mitchdenny wants to merge 1 commit into
Closed
Revert "Fix 13.4 staging CLI dropping nuget.config without Aspire package source mapping (#17528)"#17565mitchdenny wants to merge 1 commit into
mitchdenny wants to merge 1 commit into
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17565Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17565" |
Contributor
There was a problem hiding this comment.
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
PackagingServiceso staging identity again defaults toquality=Both(shared-feed routing). - Reverts pipeline channel detection back to preferring
DotNetFinalVersionKind=release→stablebefore 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reverts #17528 (commit 6a82355) on
release/13.4.Checklist