Merge pull request #2679 from pikasTech/fix/2676-public-edge-delivery-timeout
Pipelines as Code CI / hwlab-web-probe-sentinel-nc01- Success
Pipelines as Code CI / platform-infra-gitea-nc01- Success
Pipelines as Code CI / unidesk-host- Success

修复 public-edge reconcile 外层超时丢失
This commit is contained in:
Lyon
2026-07-20 23:09:29 +08:00
committed by GitHub
@@ -40,7 +40,7 @@ try {
entrypoint: plan.entrypoint,
sourceCommit: options.sourceCommit,
targetId: plan.targetId,
}));
}), 150_000);
const runtime = parseOutput(remote.stdout);
if (runtime.ok !== true) fail("host-local public-edge reconcile 未返回 ok=true");
output({
@@ -172,9 +172,12 @@ bun ${shellQuote(input.entrypoint)} --source-root "$tmp/source" --source-commit
`;
}
function runTrans(path, args, env, input) {
const result = spawnSync(path, args, { encoding: "utf8", env, input, timeout: 60_000, maxBuffer: 16 * 1024 * 1024 });
if (result.status !== 0) fail(`trans ${args.slice(1, 3).join(" ")} 失败:${result.stderr || result.stdout}`);
function runTrans(path, args, env, input, timeout = 60_000) {
const result = spawnSync(path, args, { encoding: "utf8", env, input, timeout, maxBuffer: 16 * 1024 * 1024 });
if (result.status !== 0) {
const detail = result.stderr || result.stdout || result.error?.message || `status=${result.status ?? "null"} signal=${result.signal ?? "none"}`;
fail(`trans ${args.slice(1, 3).join(" ")} 失败:${detail}`);
}
return result;
}