Prepare the Aspire CLI bundle once before the CI build, so parallel AppHost builds no longer race to download it - #424
Merged
Conversation
…ppHost builds no longer race to download it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
CI on main has failed since the Aspire 13.6.0 update (#421), with
ASPIRE009: … Automatic Aspire CLI bundle setup failed with exit code 1inVulthil.Messaging.IntegrationTest.AppHost.Cause
global.json, so the Aspire bump made the cache miss, and the build hadto prepare the bundle itself.
dnx --yes aspire.cli@13.6.0 -- setup). Thesolution has two AppHosts (
samples/AppHostand the messaging integration-test AppHost), and the build runs themin parallel.
dnxruns at once download the sameaspire.clipackage into the NuGet cache, and one of them fails with"The process cannot access the file '…/aspire.cli.13.6.0.nupkg' because it is being used by another process"
(exit code 1).
Fix
setup-buildprepares the bundle in its own step on a cache miss, in one process, with the CLI version fromAspire.AppHost.Sdkinglobal.json(the version the build asks for). The AppHost builds then find the bundleand never run the setup, and the setup's own output shows in the CI log.
Verification
dnx --yes aspire.cli@13.6.0 -- setup --install-path ~/.aspireruns → one exits 0, the other exits 1 with theNuGet-cache "being used by another process" error. One run alone exits 0.
~/.aspire/bundleand~/.aspire/versions/13.6.0_…(the cached paths) are created.
Backport to v1.0: no