Skip to content

Normalize CLI yes/no prompts - #16560

Merged
Sébastien Ros (sebastienros) merged 3 commits into
microsoft:mainfrom
sebastienros:sebros/normalize-prompts
Apr 30, 2026
Merged

Normalize CLI yes/no prompts#16560
Sébastien Ros (sebastienros) merged 3 commits into
microsoft:mainfrom
sebastienros:sebros/normalize-prompts

Conversation

@sebastienros

@sebastienros Sébastien Ros (sebastienros) commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

aspire new had 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-key y/n confirmation 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 send n directly instead of trying to move a selection cursor.

image

@github-actions

github-actions Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16560

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16560"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 n instead 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.

Comment thread src/Aspire.Cli/Interaction/PromptBinding.cs Outdated
Comment thread src/Aspire.Cli/Interaction/PromptBinding.cs Outdated
Comment thread src/Aspire.Cli/Templating/DotNetTemplateFactory.cs Outdated
@github-actions

Copy link
Copy Markdown
Contributor

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.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Matched test failure patterns (1 test)
  • Aspire.Cli.EndToEnd.Tests.TypeScriptReusablePackageTests.RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes — MCR registry rate limiting (HTTP 403)

@sebastienros

Copy link
Copy Markdown
Contributor Author

/deployment-tests

@sebastienros

Copy link
Copy Markdown
Contributor Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16560...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 18:26 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 18:26 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 18:26 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 18:26 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 18:26 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 18:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 18:26 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 18:26 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 18:26 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 18:26 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 18:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 18:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 18:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 18:26 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 29, 2026 20:11 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 29, 2026 20:11 Failure
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>
@sebastienros

Copy link
Copy Markdown
Contributor Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16560...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 19 passed, 13 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-FrontDoorDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksVnetWithAzureResourcesDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksWithAzureResourcesDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisHelmDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksMultipleNodePoolsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksBlazorRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureEventHubsDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AksVnetInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ❌ Failed ▶️ View Recording

@sebastienros

Copy link
Copy Markdown
Contributor Author

/backport to release/13.3

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/13.3 (link to workflow run)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants