Skip to content

Publish native Aspire CLI tool packages - #16570

Merged
Ankit Jain (radical) merged 2 commits into
microsoft:mainfrom
radical:fix-publishing-dotnet-tool
Apr 30, 2026
Merged

Publish native Aspire CLI tool packages#16570
Ankit Jain (radical) merged 2 commits into
microsoft:mainfrom
radical:fix-publishing-dotnet-tool

Conversation

@radical

Copy link
Copy Markdown
Member

Description

Publishes the NativeAOT Aspire CLI dotnet tool packages produced by the native build jobs.

Fixes #16563

Changes:

  • Download native Aspire.Cli*.nupkg artifacts in the internal Azure Pipelines build and stage one package per filename into artifacts/packages/$(_BuildConfig)/Shipping.
  • Validate RID-specific Aspire.Cli.<rid> packages in eng/Publishing.props using the same _ExpectedCliRids source already used for native aspire-cli-* archives.
  • Add the staged Aspire.Cli*.nupkg packages to ItemsToPushToBlobFeed as shipping package-feed items.

Validation:

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?

@github-actions

github-actions Bot commented Apr 29, 2026

Copy link
Copy Markdown
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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16570

Or

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

@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Matched test failure patterns (50 tests)
  • Aspire.Cli.EndToEnd.Tests.LocalConfigMigrationTests.LegacySettingsMigration_AdjustsRelativeAppHostPath — MCR registry rate limiting (HTTP 403)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.EnrichSqlServerTests.ShouldThrowIfDbContextIsNotRegistered — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.EnrichSqlServerTests.ShouldNotThrowIfDbContextIsRegistered — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.ConformanceTests.DbContextPoolingRegistersIDbContextPool — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.ConformanceTests.DbContextCanBeAlwaysResolved — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.ConformanceTests_TypeSpecificConfig.DbContextPoolingRegistersIDbContextPool — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.ConformanceTests_TypeSpecificConfig.DbContextCanBeAlwaysResolved — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.EnrichSqlServerTests.EnrichCanConfigureDbContextOptions — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.EnrichSqlServerTests.EnrichWithConflictingCommandTimeoutThrows — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests.ConformanceTests.TracingEnablesTheRightActivitySource — MCR container pull denied (rate limiting)
  • ...and 40 more

@radical
Ankit Jain (radical) force-pushed the fix-publishing-dotnet-tool branch from 1138718 to 144e05b Compare April 29, 2026 22:01
Ankit Jain (radical) and others added 2 commits April 29, 2026 20:44
Download RID-specific Aspire.Cli tool packages from native build artifacts and stage them in the shipping packages directory so publishing can include them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Compare discovered CLI archives and RID-specific tool packages against the expected clipack RIDs, require exactly one pointer package, and summarize publish output without listing every NuGet package.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates Aspire’s internal publishing pipeline to ensure the NativeAOT Aspire CLI dotnet tool NuGet packages (Aspire.Cli*.nupkg) produced by the native build jobs are staged and published, addressing missing Aspire.Cli packages in the feed.

Changes:

  • Download Aspire.Cli*.nupkg artifacts from native build outputs and stage a single package per filename into artifacts/packages/$(_BuildConfig)/Shipping.
  • Add validation in eng/Publishing.props to ensure RID-specific Aspire.Cli.<rid> packages exist for every expected CLI RID (using the same RID source as native archives).
  • Include staged Aspire.Cli*.nupkg packages in publishing inputs (ItemsToPushToBlobFeed) and add logging to summarize publish items.

Reviewed changes

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

File Description
eng/Publishing.props Validates expected CLI RIDs across both native archives and RID-specific tool packages; adds CLI tool nupkgs to publishing items and logs publish inputs.
eng/pipelines/azure-pipelines.yml Downloads native Aspire.Cli*.nupkg artifacts and stages deduped copies into the Shipping packages folder for publish.
eng/pipelines/azure-pipelines-unofficial.yml Mirrors the official pipeline changes to stage native CLI tool nupkgs for unofficial runs.

@radical

Copy link
Copy Markdown
Member Author

/backport to release/13.3

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/13.3 (link to workflow run)

throw "No native CLI tool packages were downloaded to $downloadRoot."
}

foreach ($packageGroup in $packages | Group-Object Name) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this possible? They were all downloaded to the same folder - how could they have the same name?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It creates the relative paths from the archive. I'll make this whole thing more robust.

Write-Host "Using $($package.FullName) for duplicate package name $($packageGroup.Name)."
}

Copy-Item -LiteralPath $package.FullName -Destination (Join-Path $shippingDir $package.Name) -Force

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just download them directly to this folder in the first place?

Comment thread eng/Publishing.props

</Target>

<Target Name="_LogPublishItemsToPush" AfterTargets="_PublishBlobItems">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? Why doesn't the publish have this log?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's there but you have kinda go and parse it from messy output. This gives a quick overview.

@radical

Copy link
Copy Markdown
Member Author

Eric Erhardt (@eerhardt) I'll tighten up the script in a follow up.

@radical
Ankit Jain (radical) merged commit cc7d4db into microsoft:main Apr 30, 2026
564 of 567 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone Apr 30, 2026
Nell Shamrell-Harrington (nellshamrell) pushed a commit to nellshamrell/aspire that referenced this pull request May 18, 2026
* fix(publishing): stage native CLI tool packages

Download RID-specific Aspire.Cli tool packages from native build artifacts and stage them in the shipping packages directory so publishing can include them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(publishing): validate CLI package RIDs

Compare discovered CLI archives and RID-specific tool packages against the expected clipack RIDs, require exactly one pointer package, and summarize publish output without listing every NuGet package.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators May 31, 2026
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 nuget package isn't being published

3 participants