-
Notifications
You must be signed in to change notification settings - Fork 757
Add set parameter command #13583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add set parameter command #13583
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13583Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13583" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a new interactive "Set parameter value" command to parameter resources, enabling users to update parameter values on-the-fly when an interaction service is available. The change provides a user-friendly way to modify parameter values during runtime, with full test coverage and localization support.
Key Changes
- Added
SetParameterValueCommandconstant toKnownResourceCommandsfor identifying the new command - Implemented command registration logic in
ParameterProcessorthat conditionally adds the command when interaction services are available - Created
SetParameterValueAsyncpublic method to handle user input prompts, parameter value updates, and persistence to deployment state in run mode
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Hosting/ApplicationModel/KnownResourceCommands.cs | Added constant for the new set parameter value command |
| src/Aspire.Hosting/Orchestrator/ParameterProcessor.cs | Implemented command registration and execution logic with deployment state persistence |
| src/Aspire.Hosting/Resources/CommandStrings.resx | Added English resource strings for command name and description |
| src/Aspire.Hosting/Resources/CommandStrings.Designer.cs | Generated designer code for new resource strings |
| src/Aspire.Hosting/Resources/xlf/*.xlf | Added localization placeholders (marked as "new") for 13 languages |
| tests/Aspire.Hosting.Tests/Orchestrator/ParameterProcessorTests.cs | Added comprehensive test coverage for command registration and execution scenarios |
| tests/Shared/TestInteractionService.cs | Implemented PromptInputAsync method to support testing of single-input interactions |
Files not reviewed (1)
- src/Aspire.Hosting/Resources/CommandStrings.Designer.cs: Language not supported
|
A few things:
|
That can go in the dialog description text.
What would someone use that for? |
You're building an onboarding experience and you want to try it out more than once without dropping to the command line (dotnet user secrets etc) |
Ok. Is it needed right now? Could add in another PR in the future. |
|
TODO: dismiss message bar when all parameters are set |
This pull request introduces a new "Set parameter value" command for parameter resources, allowing users to update parameter values interactively when supported. The change includes the implementation of the command, its integration into the parameter processing workflow, and the addition of localization resources for the new command in multiple languages.
New parameter command functionality:
SetParameterValueCommandtoKnownResourceCommandsfor setting parameter values on resources.ParameterProcessorto add the "Set parameter value" command to parameter resources when the interaction service is available and the command is not already present.AddSetParameterValueCommandmethod and the asynchronousSetParameterValueAsyncmethod inParameterProcessor, which prompts the user for a new value, updates the parameter resource, and persists the change if in run mode.Addresses #13430
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate