Runner: instabile Build-Tests behoben

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-09-30 21:53:41 +00:00
1 parent 5b902519a9
commit 71f9243bf2
1 file changed
+7 -5
+7 -5
View File
@@ -210,6 +210,7 @@ export function createJobs({ config, docker, fs: fsOver = {}, git, mem = readMem
const workDir = join(config.workRoot, 'build', run.runId);
const deadline = now() + config.buildTimeoutMs;
run.state = 'running';
let final;
try {
const prep = await prepare(job, { onLine, workDir, id: run.runId, deadline });
const d = prep.detected;
@@ -240,16 +241,17 @@ export function createJobs({ config, docker, fs: fsOver = {}, git, mem = readMem
run.result = 'build';
}
}
run.state = 'done';
final = 'done';
} catch (e) {
run.state = 'failed';
final = 'failed';
run.result = undefined;
run.error = masker(job)(e?.message || 'Unbekannter Fehler');
onLine(run.error);
} finally {
await fs.rm(workDir, { recursive: true, force: true }).catch(() => {});
run.finishedAt = now();
}
// Endzustand erst nach dem Aufräumen veröffentlichen: wer 'done'/'failed' sieht, sieht ein bereinigtes workDir und finishedAt.
await fs.rm(workDir, { recursive: true, force: true }).catch(() => {});
run.finishedAt = now();
run.state = final;
}
function submit(job) {