Fix #14640: Add configurable search timeout and increase test WaitUntil timeouts#14643
Fix #14640: Add configurable search timeout and increase test WaitUntil timeouts#14643mitchdenny wants to merge 1 commit intorelease/13.2from
Conversation
…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>
|
/deployment-test |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14643Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14643" |
|
🚀 Deployment tests starting on PR #14643... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
There was a problem hiding this comment.
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.cswith graceful degradation to partial results on timeout - Increased
WaitUntiltimeouts from 60s to 180s across 23 deployment test files for both integration and version selection prompts - Made timeout configurable via
ASPIRE_SEARCH_TIMEOUT_SECONDSenvironment 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 |
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22342561046 |
|
✅ Deployment E2E Tests passed Summary: 23 passed, 0 failed, 0 cancelled Passed Tests
🎬 Terminal Recordings
|
|
smoke tests failed? |
|
@adamint not critical glitch in the upload of the asciinema file. |
Problem
The
AcaManagedRedisDeploymentTests(and potentially other deployment tests) fail with a 60-second WaitUntil timeout because theaspire addpackage 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 runsdotnet package searchacross 4 NuGet channels in parallel viaParallel.ForEachAsync, but has no timeout. One slow NuGet feed blocks the entire search indefinitely.Changes
CLI fix (
AddCommand.cs)Parallel.ForEachAsyncASPIRE_SEARCH_TIMEOUT_SECONDSenvironment variableTest fix (23 deployment test files)
WaitUntilfrom 60s → 180s to accommodate variable NuGet feed latencyEvidence
Fixes #14640