Skip to content

Commit 28be574

Browse files
t3dotggclaude
andcommitted
fix(release): fail the Windows wait when the Linux job does not exist
A renamed or skipped Linux job never gets a conclusion, so the wait would poll for its full 40 minutes. It now fails after 5 minutes without a matching job. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 64a58d3 commit 28be574

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎.github/workflows/release-desktop.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ jobs:
329329
function Test-Archive {
330330
(Invoke-RestMethod -Headers $headers -Uri "$run/artifacts?name=$env:ARTIFACT").total_count -gt 0
331331
}
332+
$missingSince = $null
332333
while ($true) {
333334
try {
334335
if (Test-Archive) {
@@ -337,7 +338,16 @@ jobs:
337338
}
338339
$jobs = Invoke-RestMethod -Headers $headers -Uri "$run/attempts/$env:GITHUB_RUN_ATTEMPT/jobs?per_page=100"
339340
$linux = $jobs.jobs | Where-Object { $_.name.EndsWith($env:LINUX_JOB) } | Select-Object -First 1
340-
if ($linux.conclusion) {
341+
if (-not $linux) {
342+
# Both jobs start together, so a Linux job still missing after a
343+
# few minutes means a renamed or skipped job, not a slow one.
344+
if (-not $missingSince) {
345+
$missingSince = Get-Date
346+
} elseif (((Get-Date) - $missingSince).TotalMinutes -ge 5) {
347+
Write-Host "::error::No job named '$env:LINUX_JOB' in this run, so $env:ARTIFACT will not arrive."
348+
exit 1
349+
}
350+
} elseif ($linux.conclusion) {
341351
# The upload may have landed between the two requests above.
342352
if (Test-Archive) {
343353
Write-Host "$env:ARTIFACT is ready."

0 commit comments

Comments
 (0)