Add aspire dashboard CLI command and introduce unified IProcessExecutionFactory#15607
Open
Add aspire dashboard CLI command and introduce unified IProcessExecutionFactory#15607
aspire dashboard CLI command and introduce unified IProcessExecutionFactory#15607Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15607Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15607" |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new aspire dashboard top-level CLI command to launch the standalone Aspire Dashboard via the bundled aspire-managed binary, integrating it into the root command set and localized resources.
Changes:
- Registers a new
DashboardCommandin the CLI host and root command, categorized under the Monitoring help group. - Implements foreground and
--detachexecution paths and introduces localized resource strings for the new command. - Adds initial unit tests covering
--helpand the “bundle not available” error case.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Cli.Tests/Utils/CliTestHelper.cs | Registers DashboardCommand in the test DI container. |
| tests/Aspire.Cli.Tests/Commands/DashboardCommandTests.cs | Adds tests for help and missing-bundle error behavior. |
| src/Aspire.Cli/Program.cs | Registers DashboardCommand in the production DI container. |
| src/Aspire.Cli/Commands/RootCommand.cs | Adds dashboard as a root subcommand. |
| src/Aspire.Cli/Commands/DashboardCommand.cs | Implements the new aspire dashboard command (foreground/detach + arg pass-through). |
| src/Aspire.Cli/Resources/DashboardCommandStrings.resx | Adds new localized strings for the dashboard command. |
| src/Aspire.Cli/Resources/DashboardCommandStrings.Designer.cs | Strongly-typed accessor for the new dashboard strings. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.cs.xlf | Localization XLF for cs. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.de.xlf | Localization XLF for de. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.es.xlf | Localization XLF for es. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.fr.xlf | Localization XLF for fr. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.it.xlf | Localization XLF for it. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.ja.xlf | Localization XLF for ja. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.ko.xlf | Localization XLF for ko. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.pl.xlf | Localization XLF for pl. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.pt-BR.xlf | Localization XLF for pt-BR. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.ru.xlf | Localization XLF for ru. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.tr.xlf | Localization XLF for tr. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.zh-Hans.xlf | Localization XLF for zh-Hans. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.zh-Hant.xlf | Localization XLF for zh-Hant. |
Files not reviewed (1)
- src/Aspire.Cli/Resources/DashboardCommandStrings.Designer.cs: Language not supported
This was referenced Mar 28, 2026
Closed
Contributor
|
Would it make sense to have an alias |
|
To me, |
56a4214 to
2514d2c
Compare
aspire dashboard CLI command and introduce unified IProcessExecutionFactory
- Dispose IProcessExecution in DotNetCliRunner.ExecuteAsync to prevent handle leaks - Check Start() return value in LayoutProcessRunner and throw on failure - Use OptionResult.Implicit to avoid emitting default bool option values - Recognize bare --KEY tokens (boolean flags) in ConfigSettingHasValue - Add tests for bare-key and implicit-default behaviors
- Add bounds check on Split result to prevent IndexOutOfRangeException when ASPNETCORE_URLS is empty or contains only semicolons - Add ResolveSettingValue method that checks args, unmatched tokens, and env vars so the summary URL reflects the actual dashboard binding - Add parameterized tests for frontend URL variants and env var/token resolution - Rename StartupTests validation failure test to match exit code naming
Contributor
|
🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #23749387829 |
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
Add a new
aspire dashboardCLI command that starts a standalone Aspire Dashboard instance using theaspire-managedbinary from the CLI bundle, and refactor the process execution infrastructure to support both dotnet CLI and non-dotnet processes through a single abstraction.aspire dashboardcommand--frontend-url,--otlp-grpc-url,--otlp-http-url,--allow-anonymous,--config-file-path--KEY=value/--KEY valuetokens, skipping defaults when already providedMonitoringhelp groupUnified process execution infrastructure
IDotNetCliExecutionFactory→IProcessExecutionFactoryandIDotNetCliExecution→IProcessExecutionto reflect that process execution is no longer dotnet-specificDotNetCliExecution→ProcessExecutionand deleted the oldDotNetCliExecutionFactoryMSBUILDTERMINALLOGGER,DOTNET_NOLOGO, private SDK resolution) fromDotNetCliExecutionFactoryintoDotNetCliRunner, keepingIProcessExecutionFactorygenericKill(bool entireProcessTree)andIDisposabletoIProcessExecutionso callers can manage process lifetimeDotNetCliRunnerInvocationOptions→ProcessInvocationOptionsLayoutProcessRunnerfrom a static helper using rawSystem.Diagnostics.Processto an instance class that delegates toIProcessExecutionFactory, making it testable via DIProcessExecutionFactorynow accepts afileNameparameter so it can launch any executable, not justdotnetDashboard exit code tests
StartupTests.Run_AddressAlreadyInUse_ReturnsExitCodeAddressInUseandRun_ValidationFailure_ReturnsNegativeOneto verify dashboard exit code behaviorValidation
DashboardCommandTestspass, covering default args, individual options (Theory), combined options, unmatched token forwarding, browser token generation, and process error handlingChecklist
aspire.devissue: