fix: 실행 중인 릴리스 빌드를 안전하게 중단

Gateway와 프로필 DEPLOY의 빌드 단계만 취소하고 lease와 phase 전환을 직렬화한다. 관리자 화면에 중단·재시도 절차와 회귀 검증을 추가한다.
This commit is contained in:
2026-08-20 02:27:52 +00:00
parent 1bacdaef5f
commit 466f030889
11 changed files with 554 additions and 48 deletions
+24
View File
@@ -145,4 +145,28 @@ describe('PnpmBuildRunner', () => {
{ type: 'COMMAND_END' },
]);
});
it('terminates a running build process group when the operation is cancelled', async () => {
const runner = new PnpmBuildRunner();
const abortController = new AbortController();
const startedAt = Date.now();
const timer = setTimeout(() => abortController.abort(), 50);
const result = await runner.run(
[
{
command: process.execPath,
args: ['-e', "setInterval(() => process.stdout.write('still-running\\n'), 25);"],
cwd: process.cwd(),
},
],
undefined,
{ signal: abortController.signal, terminateGraceMs: 100 }
);
clearTimeout(timer);
expect(result).toMatchObject({ ok: false, aborted: true });
expect(result.output).toContain('Build cancelled by operator.');
expect(Date.now() - startedAt).toBeLessThan(2_000);
});
});