Skip to content

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

Merged
adamint merged 2 commits intomainfrom
copilot/fix-staging-option-flag
Feb 25, 2026
Merged

Hide staging channel from aspire update --self when feature flag is disabled#14675
adamint merged 2 commits intomainfrom
copilot/fix-staging-option-flag

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

Description

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.

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
Original prompt

This section details on the original issue you should resolve

<issue_title>If the staging feature flag isnt set, we shouldn't offer staging as an option in aspire update --self</issue_title>
<issue_description>### Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Without the staging feature flag set, aspire update --self fails saying no staging channel can be found. We should not show staging as an option if the feature flag isn't set.

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response</issue_description>

<agent_instructions>Use the feature flag to do this.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…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>
Copilot AI changed the title [WIP] Fix staging option in aspire update command Hide staging channel from aspire update --self when feature flag is disabled Feb 25, 2026
@github-actions
Copy link
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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14675

Or

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

@davidfowl davidfowl marked this pull request as ready for review February 25, 2026 08:12
Copilot AI review requested due to automatic review settings February 25, 2026 08:12
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 fixes aspire update --self so that the interactive channel selection prompt only offers the staging channel when the stagingChannelEnabled feature flag is enabled, preventing users from selecting an unavailable channel.

Changes:

  • Gate the self-update prompt’s channel list on KnownFeatures.StagingChannelEnabled.
  • Add unit tests covering both “staging enabled” and “staging disabled” prompt behavior.

Reviewed changes

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

File Description
src/Aspire.Cli/Commands/UpdateCommand.cs Conditionally includes staging in the self-update channel selection prompt based on the feature flag.
tests/Aspire.Cli.Tests/Commands/UpdateCommandTests.cs Adds tests asserting the prompt includes/excludes staging depending on whether the feature is enabled.

@adamint adamint merged commit ce6f521 into main Feb 25, 2026
346 checks passed
@adamint adamint deleted the copilot/fix-staging-option-flag branch February 25, 2026 18:39
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 13.2, 13.3 Feb 25, 2026
@davidfowl
Copy link
Contributor

/backport to release/13.2

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Started backporting to release/13.2: https://github.com/dotnet/aspire/actions/runs/22749767187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If the staging feature flag isnt set, we shouldn't offer staging as an option in aspire update --self

5 participants