From d052d253c159820896eba4258a28de53998b36d1 Mon Sep 17 00:00:00 2001 From: Phil Nachreiner Date: Wed, 1 Apr 2026 18:58:49 -0700 Subject: [PATCH] Set PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT to fix CDN timeout failures in .NET Aspire scenario Playwright browser downloads were failing due to upstream CDN slowness and the default connection timeout being too short. Set PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=300000 (5 minutes) in all prep and run scripts on both Windows and macOS, before any dotnet restore/build commands that may trigger Playwright browser downloads. Bumped prep_version: Windows and macOS 6->7 --- scenarios/macos/mac_net_aspire/mac_net_aspire.py | 2 +- .../mac_net_aspire_resources/mac_net_aspire_prep.sh | 4 ++++ .../mac_net_aspire_resources/mac_net_aspire_run.sh | 4 ++++ scenarios/windows/net_aspire/net_aspire.py | 2 +- .../net_aspire/net_aspire_resources/net_aspire_prep.ps1 | 6 ++++++ .../net_aspire/net_aspire_resources/net_aspire_run.ps1 | 4 ++++ 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/scenarios/macos/mac_net_aspire/mac_net_aspire.py b/scenarios/macos/mac_net_aspire/mac_net_aspire.py index dd84c41..0d78b43 100644 --- a/scenarios/macos/mac_net_aspire/mac_net_aspire.py +++ b/scenarios/macos/mac_net_aspire/mac_net_aspire.py @@ -14,7 +14,7 @@ class MacNetAspire(core.app_scenario.Scenario): module = __module__.split('.')[-1] - prep_version = "6" + prep_version = "7" resources = module + "_resources" diff --git a/scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_prep.sh b/scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_prep.sh index 1869965..373f445 100644 --- a/scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_prep.sh +++ b/scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_prep.sh @@ -157,6 +157,10 @@ log "-- Setting Python version" pyenv global 3.12.10 check_status "Setting Python global version" +# Increase Playwright browser download timeout (default is too short for slow CDN) +export PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=300000 +log "-- Set PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=300000 (5 minutes)" + # Verify Python version PYTHON_VERSION=$(python --version 2>&1 | awk '{print $2}') if [ "$PYTHON_VERSION" != "3.12.10" ]; then diff --git a/scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_run.sh b/scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_run.sh index 31e909a..8e66f05 100644 --- a/scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_run.sh +++ b/scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_run.sh @@ -125,6 +125,10 @@ if [ ! -f "build.sh" ]; then fi log "✓ build.sh found" +# Increase Playwright browser download timeout (default is too short for slow CDN) +export PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=300000 +log "-- Set PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=300000 (5 minutes)" + # ============================================================================ # Clean phase (not timed) # ============================================================================ diff --git a/scenarios/windows/net_aspire/net_aspire.py b/scenarios/windows/net_aspire/net_aspire.py index 47420be..1e7a247 100644 --- a/scenarios/windows/net_aspire/net_aspire.py +++ b/scenarios/windows/net_aspire/net_aspire.py @@ -14,7 +14,7 @@ class NetAspire(core.app_scenario.Scenario): module = __module__.split('.')[-1] - prep_version = "6" + prep_version = "7" resources = module + "_resources" diff --git a/scenarios/windows/net_aspire/net_aspire_resources/net_aspire_prep.ps1 b/scenarios/windows/net_aspire/net_aspire_resources/net_aspire_prep.ps1 index 89c35d4..de7d649 100644 --- a/scenarios/windows/net_aspire/net_aspire_resources/net_aspire_prep.ps1 +++ b/scenarios/windows/net_aspire/net_aspire_resources/net_aspire_prep.ps1 @@ -207,6 +207,12 @@ if ($isARM64) { $env:DOTNET_INSTALL_DIR = "C:\Program Files\dotnet" "-- Set DOTNET_INSTALL_DIR=$($env:DOTNET_INSTALL_DIR) to use system SDK" | log +# ------------------------------------------------------------------- +# Increase Playwright browser download timeout (default is too short for slow CDN) +# ------------------------------------------------------------------- +$env:PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT = "300000" +"-- Set PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=300000 (5 minutes)" | log + # ------------------------------------------------------------------- # Initial restore (so run iterations only need build) # ------------------------------------------------------------------- diff --git a/scenarios/windows/net_aspire/net_aspire_resources/net_aspire_run.ps1 b/scenarios/windows/net_aspire/net_aspire_resources/net_aspire_run.ps1 index a4cdda5..11df3ce 100644 --- a/scenarios/windows/net_aspire/net_aspire_resources/net_aspire_run.ps1 +++ b/scenarios/windows/net_aspire/net_aspire_resources/net_aspire_run.ps1 @@ -130,6 +130,10 @@ $env:DOTNET_INSTALL_DIR = "C:\Program Files\dotnet" "-- All installed SDKs:" | log dotnet --list-sdks 2>&1 | ForEach-Object { " $_" | log } +# Increase Playwright browser download timeout (default is too short for slow CDN) +$env:PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT = "300000" +"-- Set PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=300000 (5 minutes)" | log + # ============================================================================ # Clean phase (not timed) # ============================================================================