Skip to content

Commit 83bd6f5

Browse files
authored
fix(engine): carry over completed waitpoints on PENDING_EXECUTING stalls (#2503)
1 parent e36d78e commit 83bd6f5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,8 @@ export class RunEngine {
12381238
},
12391239
orgId: latestSnapshot.organizationId,
12401240
projectId: latestSnapshot.projectId,
1241+
checkpointId: latestSnapshot.checkpointId ?? undefined,
1242+
completedWaitpoints: latestSnapshot.completedWaitpoints,
12411243
error: {
12421244
type: "INTERNAL_ERROR",
12431245
code: "TASK_RUN_DEQUEUED_MAX_RETRIES",

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,7 @@ export class RunAttemptSystem {
11391139
workerId,
11401140
runnerId,
11411141
checkpointId,
1142+
completedWaitpoints,
11421143
tx,
11431144
}: {
11441145
run: TaskRun;
@@ -1154,6 +1155,10 @@ export class RunAttemptSystem {
11541155
runnerId?: string;
11551156
checkpointId?: string;
11561157
tx?: PrismaClientOrTransaction;
1158+
completedWaitpoints?: {
1159+
id: string;
1160+
index?: number;
1161+
}[];
11571162
}): Promise<{ wasRequeued: boolean } & ExecutionResult> {
11581163
const prisma = tx ?? this.$.prisma;
11591164

@@ -1201,6 +1206,7 @@ export class RunAttemptSystem {
12011206
workerId,
12021207
runnerId,
12031208
checkpointId,
1209+
completedWaitpoints,
12041210
});
12051211

12061212
return {

0 commit comments

Comments
 (0)