Self-contained dogfood installs under ~/.aspire/dogfood/#15951
Draft
radical wants to merge 13 commits intomicrosoft:mainfrom
Draft
Self-contained dogfood installs under ~/.aspire/dogfood/#15951radical wants to merge 13 commits intomicrosoft:mainfrom
radical wants to merge 13 commits intomicrosoft:mainfrom
Conversation
Move PR and local-dev installs to a flat layout under
~/.aspire/dogfood/{name}/ so each dogfood install is fully
self-contained (CLI + bundle + hives) and can be cleaned up
with a single directory delete.
- Program.cs: add GetInstallRootDirectory() that resolves
the install root from Environment.ProcessPath (bin/ layout
→ parent dir; flat layout → CLI dir; fallback → ~/.aspire)
- BundleService: align GetDefaultExtractDir with the same rule
- Scripts: get-aspire-cli-pr.sh/.ps1 and localhive.sh/.ps1
install to ~/.aspire/dogfood/{name}/ and no longer set
the global channel
- Docs: update dogfooding-pull-requests.md for new layout
- Tests: cover both stable and dogfood layouts
Fixes microsoft#15935
- Add filename guard to BundleService.GetDefaultExtractDir so it returns null for non-aspire binaries, matching Program.GetInstallRootDirectory - Make GetInstallRootDirectory accept an optional processPath parameter for direct unit testing of all resolver code paths - Remove dead save_global_settings / Save-GlobalSettings functions from get-aspire-cli-pr.sh and get-aspire-cli-pr.ps1 - Add 6 regression tests covering stable layout, flat layout, null path, and non-aspire process fallback for both resolvers
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15951Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15951" |
The dogfood install script places the CLI binary under ~/.aspire/dogfood/pr-<N>/ instead of ~/.aspire/bin/. Update SourceAspireBundleEnvironmentAsync and InstallAspireCliInDockerAsync to prepend the dogfood path to PATH when a PR number is known. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Self-contained dogfood installs create a local hive that causes 'aspire new' to present a 'Select a template version' prompt. Add handling in AspireNewAsync to detect this prompt and select the PR-specific hive version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The search filter text caused Enter to be consumed by the filter rather than selecting the highlighted item. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dogfood installs present a version selection prompt in 'aspire add' commands. Add a shared helper that handles this prompt, and update all affected E2E tests to use it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The version selection prompt appears at different points depending on the template: after template selection (PythonReact) or after output path (Starter). Add try/catch handlers at both positions so either location is handled correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use package-specific patterns in WaitUntilAsync to avoid matching leftover 'Select a version of' text from a prior aspire add command still visible on the terminal screen. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use full package name (e.g. 'Aspire.Hosting.JavaScript') instead of
short name ('JavaScript') when matching success text, since the CLI
outputs 'The package Aspire.Hosting.JavaScript::version was added'.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace try/catch blocks with 5-second timeouts that race against the version prompt with a combined WaitUntilAsync that checks for EITHER the version prompt OR the next expected prompt. This eliminates the race condition where the CLI takes longer than 5 seconds to show the version prompt after pressing Enter on the output path. Also tracks whether the version prompt was already handled at position 1 (after template selection) to skip the check at position 2 (after output path), preventing stale text from triggering a false match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Description
Self-contained dogfood installs under
~/.aspire/dogfood/— PR dogfooding and local-hive installs no longer overwrite the stable CLI or share directories with it.Problem (Issue #15935)
PR dogfooding currently spreads artifacts across multiple shared locations (
~/.aspire/bin/,~/.aspire/managed/,~/.aspire/dcp/,~/.aspire/hives/). This causes contamination of the stable CLI, stale state from leftover PR hives, difficult cleanup, and channel pollution fromaspire config set channel -g.Changes
C# — Install root resolution (
Program.cs,BundleService.cs)GetInstallRootDirectory()that resolves the install root based onEnvironment.ProcessPath:~/.aspire/bin/aspire) → install root is~/.aspire/~/.aspire/dogfood/pr-1234/aspire) → install root is~/.aspire/dogfood/pr-1234/GetHivesDirectory()now uses the install root, so dogfood hives are discovered relative to the CLI's own directoryBundleService.GetDefaultExtractDir()uses the same resolution logic, with a filename guard ensuring both resolvers agreeScripts (
get-aspire-cli-pr.sh/.ps1,localhive.sh/.ps1)<prefix>/dogfood/pr-{N}/instead of<prefix>/bin/aspire config set channel -gcalls — no longer needed since the self-contained install discovers its own hivessave_global_settings/Save-GlobalSettingsfunction definitionsDocs (
dogfooding-pull-requests.md)Tests (
ProgramTests.cs,BundleServiceTests.cs)GetDefaultExtractDirreturns null for non-aspire binaries (verifies resolver alignment)Cleanup
Dogfood cleanup is now a single directory delete:
rm -rf ~/.aspire/dogfood/pr-1234The stable CLI at
~/.aspire/bin/aspireis not affected by dogfood installs.Fixes #15935
Checklist