From f3ad744b4674b36f913419ff2b174bd66954a3aa Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Wed, 8 Apr 2026 13:30:33 -0700 Subject: [PATCH] ci: fail loudly when artifact download times out spawnSafe's timeout kills buildkite-agent mid-download but returns {error: 'timeout'} without throwing. The caller then picked whichever zip(s) had finished, so on a slow VM the 149 MiB profile zip would be dropped and tests silently ran against the release bun.exe instead of bun-profile.exe. Bump the timeout to 120s and throw on timeout instead of proceeding with a partial download. --- scripts/runner.node.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/runner.node.mjs b/scripts/runner.node.mjs index efb6dbe46919..04371ff6864e 100755 --- a/scripts/runner.node.mjs +++ b/scripts/runner.node.mjs @@ -1972,11 +1972,17 @@ async function getExecPathFromBuildKite(target, buildId) { args.push("--build", buildId); } - await spawnSafe({ + const { error } = await spawnSafe({ command: "buildkite-agent", args, - timeout: 60000, + timeout: 120000, }); + if (error === "timeout") { + throw new Error( + `buildkite-agent artifact download timed out after 120s for step '${target}'. ` + + `Refusing to continue with a partial download (would silently fall back to the wrong binary).`, + ); + } zipPath = readdirSync(releasePath, { recursive: true, encoding: "utf-8" }) .filter(filename => /^bun.*\.zip$/i.test(filename))