Skip to content

[release/13.2] Hide staging channel from aspire update --self when feature flag is disabled#14997

Merged
davidfowl merged 2 commits intorelease/13.2from
backport/pr-14675-to-release/13.2
Mar 6, 2026
Merged

[release/13.2] Hide staging channel from aspire update --self when feature flag is disabled#14997
davidfowl merged 2 commits intorelease/13.2from
backport/pr-14675-to-release/13.2

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 6, 2026

Description

Backport of #14675 to release/13.2.

aspire update --self unconditionally offered "staging" in the channel selection prompt, regardless of the stagingChannelEnabled feature flag. Selecting it without the flag would fail since no staging channel exists.

The fix checks _features.IsFeatureEnabled(KnownFeatures.StagingChannelEnabled) before including staging in the prompt choices — consistent with how the channel option description and PackagingService.GetChannelsAsync already gate on this flag.

Fixes #14648

Customer Impact

Users running aspire update --self without the staging feature flag enabled would see "staging" as a channel option. Selecting it would fail with an error about no staging channel being found.

Testing

Two new unit tests added:

  • SelfUpdate_WithStagingDisabled_DoesNotOfferStagingChannel
  • SelfUpdate_WithStagingEnabled_OffersStagingChannel

Risk

Low — only changes the channel list filtering in the self-update prompt.

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
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

@github-actions
Copy link
Contributor Author

github-actions bot commented Mar 6, 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 -- 14997

Or

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

@github-actions
Copy link
Contributor Author

github-actions bot commented Mar 6, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit fb455c1:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ❌ Upload failed
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22752267123

Copilot AI and others added 2 commits March 5, 2026 22:36
…isabled

When the stagingChannelEnabled feature flag is not set, the staging
channel is now excluded from the channel selection prompt in
`aspire update --self`. Previously, staging was always shown regardless
of the feature flag, which caused failures when users selected it.

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
@davidfowl davidfowl force-pushed the backport/pr-14675-to-release/13.2 branch from 8857aa3 to fb455c1 Compare March 6, 2026 06:38
@davidfowl davidfowl requested a review from JamesNK March 6, 2026 06:52
@davidfowl davidfowl enabled auto-merge (squash) March 6, 2026 06:52
@davidfowl davidfowl merged commit 0669b8f into release/13.2 Mar 6, 2026
384 of 385 checks passed
@davidfowl davidfowl deleted the backport/pr-14675-to-release/13.2 branch March 6, 2026 07:02
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 6, 2026
eerhardt pushed a commit to eerhardt/aspire that referenced this pull request Mar 7, 2026
…feature flag is disabled (microsoft#14997)

* Initial plan

* Hide staging channel from aspire update --self when feature flag is disabled

When the stagingChannelEnabled feature flag is not set, the staging
channel is now excluded from the channel selection prompt in
`aspire update --self`. Previously, staging was always shown regardless
of the feature flag, which caused failures when users selected it.

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot AI added a commit that referenced this pull request Mar 10, 2026
…feature flag is disabled (#14997)

* Initial plan

* Hide staging channel from aspire update --self when feature flag is disabled

When the stagingChannelEnabled feature flag is not set, the staging
channel is now excluded from the channel selection prompt in
`aspire update --self`. Previously, staging was always shown regardless
of the feature flag, which caused failures when users selected it.

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants