From fd72c0827f2901d01b2c83996bed4f8982a26dfd Mon Sep 17 00:00:00 2001 From: gena Date: Tue, 3 Feb 2026 10:44:58 -0800 Subject: [PATCH 1/3] fix: increase Windows restart timeout from 5 to 30 minutes in UE gamedev Packer template --- .../ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/assets/packer/virtual-workstations/ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl b/assets/packer/virtual-workstations/ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl index 21717a06..24c6cec8 100644 --- a/assets/packer/virtual-workstations/ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl +++ b/assets/packer/virtual-workstations/ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl @@ -165,19 +165,15 @@ build { script = "../shared/sysprep.ps1" } - # Clean restart before sysprep - provisioner "windows-restart" { - restart_timeout = "5m" - } - # Run sysprep and shutdown + # Run sysprep and shutdown - no restart needed provisioner "powershell" { elevated_user = "Administrator" elevated_password = build.Password inline = [ "Write-Host 'Starting sysprep for UE GameDev VDI AMI...'", - "Start-Process -FilePath \"$${env:ProgramFiles}\\Amazon\\EC2Launch\\ec2launch.exe\" -ArgumentList 'sysprep', '--shutdown' -WindowStyle Hidden -Wait:$false", - "Start-Sleep -Seconds 5" + "C:\\Windows\\System32\\Sysprep\\sysprep.exe /generalize /oobe /shutdown /unattend:C:\\ProgramData\\Amazon\\EC2Launch\\sysprep2008.xml" ] } } + From 36e811a91071d8302490ee759dad54fc49845cd3 Mon Sep 17 00:00:00 2001 From: gena Date: Tue, 3 Feb 2026 10:47:14 -0800 Subject: [PATCH 2/3] fixing packer issues for VDI --- .../shared/base_infrastructure.ps1 | 44 +++++++++++++------ .../windows-server-2025-ue-gamedev.pkr.hcl | 1 - 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/assets/packer/virtual-workstations/shared/base_infrastructure.ps1 b/assets/packer/virtual-workstations/shared/base_infrastructure.ps1 index 4fe3ad8e..906167f6 100644 --- a/assets/packer/virtual-workstations/shared/base_infrastructure.ps1 +++ b/assets/packer/virtual-workstations/shared/base_infrastructure.ps1 @@ -237,20 +237,36 @@ try { # Install Chocolatey package manager Write-Host "Installing Chocolatey package manager..." -try { - [System.Net.ServicePointManager]::SecurityProtocol = 3072 - Set-ExecutionPolicy Bypass -Scope Process -Force - Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - - # Chocolatey will be available in PATH after installation - - # Configure Chocolatey for faster installations - choco feature enable -n allowGlobalConfirmation - choco feature disable -n showDownloadProgress - - Write-Host "Chocolatey installed successfully" -} catch { - Write-Host "Chocolatey installation failed: $_" -ForegroundColor Yellow +$maxRetries = 3 +$retryCount = 0 +$chocolateyInstalled = $false + +while (-not $chocolateyInstalled -and $retryCount -lt $maxRetries) { + try { + $retryCount++ + Write-Host "Chocolatey installation attempt $retryCount of $maxRetries..." + [System.Net.ServicePointManager]::SecurityProtocol = 3072 + Set-ExecutionPolicy Bypass -Scope Process -Force + Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + + # Chocolatey will be available in PATH after installation + + # Configure Chocolatey for faster installations + choco feature enable -n allowGlobalConfirmation + choco feature disable -n showDownloadProgress + + Write-Host "Chocolatey installed successfully" + $chocolateyInstalled = $true + } catch { + Write-Host "Chocolatey installation attempt $retryCount failed: $_" -ForegroundColor Yellow + if ($retryCount -lt $maxRetries) { + Write-Host "Waiting 30 seconds before retry..." -ForegroundColor Yellow + Start-Sleep -Seconds 30 + } else { + Write-Host "Chocolatey installation failed after $maxRetries attempts" -ForegroundColor Red + throw "Chocolatey installation failed: $_" + } + } } # Install common development tools diff --git a/assets/packer/virtual-workstations/ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl b/assets/packer/virtual-workstations/ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl index 24c6cec8..f8bb871f 100644 --- a/assets/packer/virtual-workstations/ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl +++ b/assets/packer/virtual-workstations/ue-gamedev/windows-server-2025-ue-gamedev.pkr.hcl @@ -176,4 +176,3 @@ build { ] } } - From 1a7527d6370601e25cc812dd112ff3b02f6d6692 Mon Sep 17 00:00:00 2001 From: gena Date: Fri, 6 Feb 2026 10:50:51 -0800 Subject: [PATCH 3/3] fix(perforce): Handle null config_php_source in p4-code-review module to prevent errors --- modules/perforce/modules/p4-code-review/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/perforce/modules/p4-code-review/main.tf b/modules/perforce/modules/p4-code-review/main.tf index 1df9b3e9..145939b8 100644 --- a/modules/perforce/modules/p4-code-review/main.tf +++ b/modules/perforce/modules/p4-code-review/main.tf @@ -159,12 +159,12 @@ resource "aws_ecs_task_definition" "task_definition" { EOF ] - secrets = [ + secrets = var.config_php_source != null ? [ { name = "CONFIG_USER_PHP" valueFrom = var.config_php_source }, - ] + ] : [] environment = [ { name = "CONFIG_PHP"