fix(run-engine): Preserve snapshot checkpoint ID when a PENDING_EXECUTING snapshot stalls (#2493)

This commit is contained in:
Eric Allam
2025-09-10 14:55:57 +01:00
committed by GitHub
parent b9b17e24ac
commit 8e66913e59
2 changed files with 4 additions and 0 deletions
@@ -1251,6 +1251,7 @@ export class RunEngine {
},
orgId: latestSnapshot.organizationId,
projectId: latestSnapshot.projectId,
checkpointId: latestSnapshot.checkpointId ?? undefined,
error: {
type: "INTERNAL_ERROR",
code: "TASK_RUN_DEQUEUED_MAX_RETRIES",
@@ -1129,6 +1129,7 @@ export class RunAttemptSystem {
error,
workerId,
runnerId,
checkpointId,
tx,
}: {
run: TaskRun;
@@ -1142,6 +1143,7 @@ export class RunAttemptSystem {
error: TaskRunInternalError;
workerId?: string;
runnerId?: string;
checkpointId?: string;
tx?: PrismaClientOrTransaction;
}): Promise<{ wasRequeued: boolean } & ExecutionResult> {
const prisma = tx ?? this.$.prisma;
@@ -1189,6 +1191,7 @@ export class RunAttemptSystem {
organizationId: orgId,
workerId,
runnerId,
checkpointId,
});
return {