[release/13.0] Filter to highest package version per channel in aspire add command #12587
      
        
          +207
        
        
          −15
        
        
          
        
      
    
  
  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.
  
    
  
    
Backport of #12553 to release/13.0
/cc @mitchdenny @copilot
Customer Impact
This PR addresses an issue in the
aspire addcommand where we show two versions of a package when a channel is chosen when only one should be shown. The underlying reason is that a channel is often comprised of multiple feeds (e.g. the daily feed references dotnet9 and nuget.org) and in the case of the Docker integration there is a pre-release package in both.This update effectively filters the list so we only show the highest version across package sources.
Before:
After:
Testing
Manual validation
Risk
Low. Mostly impacts the preview PR experience (or when using a preview package)
Regression?