From e8bdb6933e610948eeaa7a7a5059eedbf06ef944 Mon Sep 17 00:00:00 2001 From: ethernet Date: Tue, 11 Aug 2026 14:01:22 -0400 Subject: [PATCH] fix(windows-e2e): 'auto' sentinel for install-ref - powershell -File eats empty-string args Run 31520267702 died in 3s: 'Missing an argument for parameter InstallRef'. powershell.exe -File drops a "" argument from the command line entirely, so the parameter binder saw -InstallRef followed by -SetupExeUrl. Default both the workflow input and the script parameter to 'auto' (= newest release tag) instead of empty. --- .github/workflows/install-e2e-windows-run.yml | 4 ++-- tests/install/windows-desktop-gui-e2e.ps1 | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/install-e2e-windows-run.yml b/.github/workflows/install-e2e-windows-run.yml index 8a8ac84790..7816c14270 100644 --- a/.github/workflows/install-e2e-windows-run.yml +++ b/.github/workflows/install-e2e-windows-run.yml @@ -41,10 +41,10 @@ on: type: string default: desktop install-ref: - description: 'Ref to install as OLD (served as main while the installer runs). Empty = the newest release tag in the checkout.' + description: 'Ref to install as OLD (served as main while the installer runs). auto = the newest release tag in the checkout.' required: false type: string - default: '' + default: auto setup-exe-url: description: 'Bootstrap installer to install OLD with. Default: the latest published one — what a user downloads today.' required: false diff --git a/tests/install/windows-desktop-gui-e2e.ps1 b/tests/install/windows-desktop-gui-e2e.ps1 index ef4b5ee1f6..e5f950233a 100644 --- a/tests/install/windows-desktop-gui-e2e.ps1 +++ b/tests/install/windows-desktop-gui-e2e.ps1 @@ -82,10 +82,12 @@ param( # i.e. what the user starts on. The published Hermes-Setup.exe carries # no commit pin (Pin { commit: None, branch: "main" }) -- it installs # whatever `main` points at, so staging OLD means serving it there. - # Empty = newest release tag in the checkout (the "user on the current - # release" starting point, same philosophy as the linux axis's tag - # matrix). - [string]$InstallRef = "", + # Empty or "auto" = newest release tag in the checkout (the "user on + # the current release" starting point, same philosophy as the linux + # axis's tag matrix). "auto" exists because `powershell -File` silently + # swallows an empty-string argument ('Missing an argument for + # parameter'), so the workflow cannot pass "". + [string]$InstallRef = "auto", # Repo checkout whose HEAD is the update target. [string]$RepoRoot = "", @@ -301,7 +303,7 @@ function Invoke-PhaseStage { # OLD: explicit -InstallRef, or the newest release tag -- the version a # user who installed on release day is on. $oldRef = $InstallRef - if (-not $oldRef) { + if (-not $oldRef -or $oldRef -eq "auto") { $oldRef = (Invoke-Git @("-C", $RepoRoot, "tag", "--list", "v*", "--sort=-creatordate") -split "`r?`n" | Select-Object -First 1) if (-not $oldRef) { throw "no v* release tags in the checkout and no -InstallRef given -- cannot pick an OLD version" } }