Skip to content

Fix channel ordering in aspire update - staging before daily#12760

Merged
eerhardt merged 2 commits intomainfrom
copilot/update-staging-list-order
Nov 6, 2025
Merged

Fix channel ordering in aspire update - staging before daily#12760
eerhardt merged 2 commits intomainfrom
copilot/update-staging-list-order

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Description

Fixes the ordering of channels displayed in aspire update. The staging channel now appears after stable and before daily, instead of appearing after all pr-* channels.

Before:

default, stable, daily, pr-10167, pr-10985, ..., staging

After:

default, stable, staging, daily, pr-10167, pr-10985, ...

Changes

  • PackagingService.GetChannelsAsync(): Restructured channel list construction to insert staging between stable and daily
  • Tests: Added ordering verification tests for both enabled and disabled staging channel scenarios

Fixes #12797

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

This section details on the original issue you should resolve

<issue_title>Aspire.Cli should list "staging" before all the "pr-*" in aspire update</issue_title>
<issue_description>When running aspire update I get the following list:

default (based on NuGet.config)
  stable (https://api.nuget.org/v3/index.json)
  daily (https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json)
  pr-10167 (C:\Users\eerhardt\.aspire\hives\pr-10167)
  pr-10985 (C:\Users\eerhardt\.aspire\hives\pr-10985)
  pr-11570 (C:\Users\eerhardt\.aspire\hives\pr-11570)
  pr-11832 (C:\Users\eerhardt\.aspire\hives\pr-11832)
  pr-12068 (C:\Users\eerhardt\.aspire\hives\pr-12068)
  pr-12096 (C:\Users\eerhardt\.aspire\hives\pr-12096)
  pr-12103 (C:\Users\eerhardt\.aspire\hives\pr-12103)
 staging (https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-aspire-360fbd45/nuget/v3/index.json)

We should change this order so staging comes before daily.

  • default
  • stable
  • staging
  • daily</issue_description>

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.

Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Aspire.Cli to list staging before pr-* in aspire update Fix channel ordering in aspire update - staging before daily Nov 6, 2025
Copilot AI requested a review from eerhardt November 6, 2025 18:32
@eerhardt eerhardt marked this pull request as ready for review November 6, 2025 20:30
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 the channel ordering in the Aspire CLI packaging service to ensure the staging channel appears in the correct position when enabled. Previously, the staging channel was added after daily and PR channels; now it is correctly positioned between stable and daily channels.

Key Changes:

  • Modified channel list construction to build incrementally rather than using collection initialization
  • Added staging channel insertion point after stable, before daily and PR channels
  • Added comprehensive tests verifying channel ordering in both enabled and disabled states

Reviewed Changes

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

File Description
src/Aspire.Cli/Packaging/PackagingService.cs Refactored GetChannelsAsync to build channel list incrementally, ensuring staging channel appears between stable and daily when enabled
tests/Aspire.Cli.Tests/Packaging/PackagingServiceTests.cs Added two tests verifying channel ordering with staging enabled and disabled, including assertions for multiple PR channels

@eerhardt eerhardt enabled auto-merge (squash) November 6, 2025 20:54
@eerhardt
Copy link
Member

eerhardt commented Nov 6, 2025

This doesn't need to go into release/13.0. We can just keep this in main for now.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

🚀 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 -- 12760

Or

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

@eerhardt eerhardt merged commit 0dbf46c into main Nov 6, 2025
301 of 302 checks passed
@eerhardt eerhardt deleted the copilot/update-staging-list-order branch November 6, 2025 21:21
@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Nov 6, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2025
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.

Aspire.Cli should list "staging" before all the "pr-*" in aspire update

4 participants