Skip to content

Commit 8e66913

Browse files
authored
fix(run-engine): Preserve snapshot checkpoint ID when a PENDING_EXECUTING snapshot stalls (#2493)
1 parent b9b17e2 commit 8e66913

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

internal-packages/run-engine/src/engine/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,7 @@ export class RunEngine {
12511251
},
12521252
orgId: latestSnapshot.organizationId,
12531253
projectId: latestSnapshot.projectId,
1254+
checkpointId: latestSnapshot.checkpointId ?? undefined,
12541255
error: {
12551256
type: "INTERNAL_ERROR",
12561257
code: "TASK_RUN_DEQUEUED_MAX_RETRIES",

internal-packages/run-engine/src/engine/systems/runAttemptSystem.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,7 @@ export class RunAttemptSystem {
11291129
error,
11301130
workerId,
11311131
runnerId,
1132+
checkpointId,
11321133
tx,
11331134
}: {
11341135
run: TaskRun;
@@ -1142,6 +1143,7 @@ export class RunAttemptSystem {
11421143
error: TaskRunInternalError;
11431144
workerId?: string;
11441145
runnerId?: string;
1146+
checkpointId?: string;
11451147
tx?: PrismaClientOrTransaction;
11461148
}): Promise<{ wasRequeued: boolean } & ExecutionResult> {
11471149
const prisma = tx ?? this.$.prisma;
@@ -1189,6 +1191,7 @@ export class RunAttemptSystem {
11891191
organizationId: orgId,
11901192
workerId,
11911193
runnerId,
1194+
checkpointId,
11921195
});
11931196

11941197
return {

0 commit comments

Comments
 (0)