Fix aspire config list --all showing no features when no config exists#15821
Open
Fix aspire config list --all showing no features when no config exists#15821
aspire config list --all showing no features when no config exists#15821Conversation
1 task
Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/56df1d59-b00d-43c5-ad6e-a501718d413c Co-authored-by: maddymontaquila <12660687+maddymontaquila@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix config list --all behavior for empty configuration
Fix Apr 2, 2026
aspire config list --all showing no features when no config exists
Contributor
|
@davidfowl try this when youre home |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes aspire config list --all so that it still displays the available feature flags (with defaults/descriptions) even on a fresh install where no local/global config files exist, and improves the config list no-config UX by adding a hint to use --all.
Changes:
- Adjust
config listcontrol flow to avoid an unconditional early return when both local/global config are empty, while still keeping the “no config” message. - Add a
--allhint in the no-config + no---allcase, and allow--allto fall through to the feature listing. - Add unit tests covering both no-config scenarios (
config listandconfig list --all).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Cli/Commands/ConfigCommand.cs | Makes the empty-config path --all-aware so features are still displayed when requested. |
| tests/Aspire.Cli.Tests/Commands/ConfigCommandTests.cs | Adds test coverage for the new no-config behavior with/without --all. |
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15821Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15821" |
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.
aspire config list --allwith a fresh install (no config set) would hit an early-return path and only print "No configuration values found." — never displaying available feature flags. Similarly,aspire config listgave no hint to try--all.Changes
ConfigCommand.cs—ListCommand.ExecuteAsync: Replace the unconditional early-return on empty config with flag-aware branching:config list(no--all, no config): show "No configuration values found." + hint to run--all, then returnconfig list --all(no config): show "No configuration values found." then fall through to display all feature flags with defaults/descriptionsConfigCommandTests.cs: Two new tests covering the no-config cases for both with and without--allChecklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue:Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dnceng.pkgs.visualstudio.com/usr/share/dotnet/dotnet dotnet test tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj -- --filter-method *.ConfigListCommand_WithoutAllFlag_ShowsHintInsteadOfFeatures --filter-method *.ConfigListCommand_WithAllFlag_ShowsFeatureDetails --filter-method *.ConfigListCommand_WithoutAllFlag_NoConfig_ShowsHintAboutAllFlag --filter-method *.ConfigListCommand_WithAllFlag_NoConfig_ShowsAvailableFeatures --filter-not-trait quarantined=true --filter-not-trait outerloop=true(dns block)If you need me to access, download, or install something from one of these locations, you can either: