Skip to content

Fix #14640: Add configurable search timeout and increase test WaitUntil timeouts#14643

Closed
mitchdenny wants to merge 1 commit intorelease/13.2from
fix/add-search-timeout
Closed

Fix #14640: Add configurable search timeout and increase test WaitUntil timeouts#14643
mitchdenny wants to merge 1 commit intorelease/13.2from
fix/add-search-timeout

Conversation

@mitchdenny
Copy link
Member

Problem

The AcaManagedRedisDeploymentTests (and potentially other deployment tests) fail with a 60-second WaitUntil timeout because the aspire add package search takes >60 seconds when a NuGet feed is slow.

Root cause (proven via asciinema recordings): The Searching for Aspire integrations... spinner ran for 60+ seconds in the failed run — the search was still in progress when the test's WaitUntil expired. The CLI runs dotnet package search across 4 NuGet channels in parallel via Parallel.ForEachAsync, but has no timeout. One slow NuGet feed blocks the entire search indefinitely.

Changes

CLI fix (AddCommand.cs)

  • Added configurable search timeout (default 120s) wrapping Parallel.ForEachAsync
  • On timeout, uses partial results collected so far instead of blocking indefinitely
  • Configurable via ASPIRE_SEARCH_TIMEOUT_SECONDS environment variable

Test fix (23 deployment test files)

  • Increased all version/integration selection prompt WaitUntil from 60s → 180s to accommodate variable NuGet feed latency

Evidence

Run Search Duration Outcome
22335787750 ~12s ✅ Passed
22335251201 >60s (still running) ❌ Failed
22205535045 ~12s ❌ Failed at later step

Fixes #14640

…il timeouts

The aspire add package search runs dotnet package search across 4 NuGet
channels in parallel. When one feed is slow, the entire search blocks
because Parallel.ForEachAsync waits for all channels to complete.

This caused the AcaManagedRedisDeploymentTests (and potentially other
deployment tests) to fail with WaitUntil timeouts when the search
spinner ran for >60 seconds.

Changes:
- Add configurable search timeout (default 120s) to AddCommand. When the
  timeout fires, partial results collected so far are used instead of
  blocking indefinitely. Override via ASPIRE_SEARCH_TIMEOUT_SECONDS env var.
- Increase version selection prompt WaitUntil from 60s to 180s across all
  23 deployment E2E tests to accommodate variable NuGet feed latency.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 24, 2026 08:24
@mitchdenny
Copy link
Member Author

/deployment-test

@github-actions
Copy link
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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14643

Or

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

@github-actions
Copy link
Contributor

🚀 Deployment tests starting on PR #14643...

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

View workflow run

Copy link
Contributor

Copilot AI left a 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 addresses intermittent deployment test failures caused by slow NuGet package searches that exceed the test's 60-second timeout. The fix implements a two-pronged approach: adding a configurable search timeout in the CLI and increasing test wait timeouts to accommodate variable NuGet feed latency.

Changes:

  • Added configurable search timeout (default 120s) to AddCommand.cs with graceful degradation to partial results on timeout
  • Increased WaitUntil timeouts from 60s to 180s across 23 deployment test files for both integration and version selection prompts
  • Made timeout configurable via ASPIRE_SEARCH_TIMEOUT_SECONDS environment variable

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Aspire.Cli/Commands/AddCommand.cs Added GetSearchTimeout() helper method and wrapped Parallel.ForEachAsync package search with configurable timeout (default 120s), using partial results if search times out
tests/Aspire.Deployment.EndToEnd.Tests/VnetStorageBlobInfraDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/VnetStorageBlobConnectivityDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/VnetSqlServerInfraDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/VnetSqlServerConnectivityDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/VnetKeyVaultInfraDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/VnetKeyVaultConnectivityDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/PythonFastApiDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AzureStorageDeploymentTests.cs Increased integration and version selection prompt timeouts from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/AzureServiceBusDeploymentTests.cs Increased integration and version selection prompt timeouts from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/AzureLogAnalyticsDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AzureKeyVaultDeploymentTests.cs Increased integration and version selection prompt timeouts from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/AzureEventHubsDeploymentTests.cs Increased integration and version selection prompt timeouts from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/AzureContainerRegistryDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AzureAppConfigDeploymentTests.cs Increased integration and version selection prompt timeouts from 60s to 180s (3 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/AppServiceReactDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AppServicePythonDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AksStarterWithRedisDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AksStarterDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AcaStarterDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AcaExistingRegistryDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s (2 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/AcaCustomRegistryDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s (2 occurrences)
tests/Aspire.Deployment.EndToEnd.Tests/AcaCompactNamingUpgradeDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s
tests/Aspire.Deployment.EndToEnd.Tests/AcaCompactNamingDeploymentTests.cs Increased version selection prompt timeout from 60s to 180s

@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing February 24, 2026 08:29 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 581a177:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AgentInitCommand_WithMalformedMcpJson_ShowsErrorAndExitsNonZero ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ❌ Upload failed
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ❌ Upload failed
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ❌ Upload failed
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22342561046

@github-actions
Copy link
Contributor

Deployment E2E Tests passed

Summary: 23 passed, 0 failed, 0 cancelled

View workflow run

Passed Tests

  • ✅ AcaExistingRegistryDeploymentTests
  • ✅ AksStarterDeploymentTests
  • ✅ AcaStarterDeploymentTests
  • ✅ AcaCompactNamingDeploymentTests
  • ✅ AzureAppConfigDeploymentTests
  • ✅ AzureEventHubsDeploymentTests
  • ✅ AcaCustomRegistryDeploymentTests
  • ✅ AzureContainerRegistryDeploymentTests
  • ✅ AppServiceReactDeploymentTests
  • ✅ AppServicePythonDeploymentTests
  • ✅ AzureKeyVaultDeploymentTests
  • ✅ AksStarterWithRedisDeploymentTests
  • ✅ AuthenticationTests
  • ✅ AcaCompactNamingUpgradeDeploymentTests
  • ✅ VnetKeyVaultInfraDeploymentTests
  • ✅ AzureLogAnalyticsDeploymentTests
  • ✅ VnetStorageBlobConnectivityDeploymentTests
  • ✅ VnetSqlServerInfraDeploymentTests
  • ✅ AzureStorageDeploymentTests
  • ✅ VnetKeyVaultConnectivityDeploymentTests
  • ✅ AzureServiceBusDeploymentTests
  • ✅ PythonFastApiDeploymentTests
  • ✅ VnetStorageBlobInfraDeploymentTests

🎬 Terminal Recordings

Test Recording
DeployAzureAppConfigResource ▶️ View Recording
DeployAzureContainerRegistryResource ▶️ View Recording
DeployAzureEventHubsResource ▶️ View Recording
DeployAzureKeyVaultResource ▶️ View Recording
DeployAzureLogAnalyticsResource ▶️ View Recording
DeployAzureServiceBusResource ▶️ View Recording
DeployAzureStorageResource ▶️ View Recording
DeployPythonFastApiTemplateToAzureAppService ▶️ View Recording
DeployPythonFastApiTemplateToAzureContainerApps ▶️ View Recording
DeployReactTemplateToAzureAppService ▶️ View Recording
DeployStarterTemplateToAks ▶️ View Recording
DeployStarterTemplateToAzureContainerApps ▶️ View Recording
DeployStarterTemplateWithCustomRegistry ▶️ View Recording
DeployStarterTemplateWithExistingRegistry ▶️ View Recording
DeployStarterTemplateWithKeyVaultPrivateEndpoint ▶️ View Recording
DeployStarterTemplateWithRedisToAks ▶️ View Recording
DeployStarterTemplateWithStorageBlobPrivateEndpoint ▶️ View Recording
DeployVnetKeyVaultInfrastructure ▶️ View Recording
DeployVnetSqlServerInfrastructure ▶️ View Recording
DeployVnetStorageBlobInfrastructure ▶️ View Recording
DeployWithCompactNamingFixesStorageCollision ▶️ View Recording
UpgradeFromGaToDevDoesNotDuplicateStorageAccounts ▶️ View Recording

@adamint
Copy link
Member

adamint commented Feb 24, 2026

smoke tests failed?

@mitchdenny
Copy link
Member Author

@adamint not critical glitch in the upload of the asciinema file.

@mitchdenny mitchdenny closed this Feb 26, 2026
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants