Normalize CLI yes/no prompts - #16560
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16560Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16560" |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Normalizes aspire new boolean prompts to use a consistent [y/N] / [Y/n] confirmation flow by wiring nullable bool options through a shared confirmation prompt path, and updates automation/tests accordingly.
Changes:
- Replaces several Yes/No selection-list prompts with
PromptConfirmAsync(templating and NuGet.config prompting). - Introduces a
bool?-option confirmation binding (PromptBinding.CreateBoolConfirm) and updates tests to exercise it. - Updates terminal/e2e automation helpers to respond with single-key
ninstead of moving a selection cursor.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Shared/Hex1bTestHelpers.cs | Adjusts terminal input sequence to answer confirm prompts via n key. |
| tests/Shared/Hex1bAutomatorTestHelpers.cs | Adjusts automator interactions to answer confirm prompts via n key. |
| tests/Aspire.Cli.Tests/Interaction/ConsoleInteractionServiceTests.cs | Updates unit test to validate new confirm binding name/symbol display behavior. |
| tests/Aspire.Cli.Tests/Commands/NewCommandTests.cs | Updates tests to use confirm callback rather than selection callback for Localhost TLD prompt. |
| tests/Aspire.Cli.EndToEnd.Tests/Helpers/KubernetesDeployTestHelpers.cs | Updates e2e helper to decline Redis using n key. |
| src/Aspire.Cli/Templating/DotNetTemplateFactory.cs | Converts multiple template prompts from selection to confirmation prompts. |
| src/Aspire.Cli/Templating/CliTemplateFactory.PythonStarterTemplate.cs | Converts Redis prompt from selection to confirmation prompt. |
| src/Aspire.Cli/Templating/CliTemplateFactory.EmptyTemplate.cs | Converts Localhost TLD prompt from selection to confirmation prompt. |
| src/Aspire.Cli/Packaging/NuGetConfigPrompter.cs | Converts NuGet.config create/update prompts from selection to confirmation prompt. |
| src/Aspire.Cli/Interaction/PromptBinding.cs | Removes selection-based bool binding and adds confirmation-based bool binding. |
|
Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
Matched test failure patterns (1 test)
|
|
/deployment-tests |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16560... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
Treat the configured local hive as a local build channel so aspire add keeps generated AppHosts on the same CLI/SDK version and writes the local NuGet source when needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This reverts commit 6821787.
|
/deployment-test |
|
🚀 Deployment tests starting on PR #16560... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
❌ Deployment E2E Tests failed — 19 passed, 13 failed, 0 cancelled View test results and recordings
|
|
/backport to release/13.3 |
|
Started backporting to |
Summary
aspire newhad two different yes/no prompt experiences: some options used up/down selection lists while others used confirmation prompts with[Y/n]or[y/N]defaults. This normalizes the boolean prompts so reviewers and users get the same convention everywhere, with single-keyy/nconfirmation behavior from the shared prompt path.This change adds a bool confirmation binding for nullable bool options and converts the remaining yes/no selection prompts in template option flow and NuGet.config prompting to
PromptConfirmAsync. The default casing continues to communicate the Enter default, for example[y/N]for default no. E2E helpers that decline Redis now sendndirectly instead of trying to move a selection cursor.