Skip to content

Commit c3f40d6

Browse files
committed
fix(engine): carry over completed waitpoints on PENDING_EXECUTING stalls
1 parent 10e7985 commit c3f40d6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-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
@@ -1239,6 +1239,7 @@ export class RunEngine {
12391239
orgId: latestSnapshot.organizationId,
12401240
projectId: latestSnapshot.projectId,
12411241
checkpointId: latestSnapshot.checkpointId ?? undefined,
1242+
completedWaitpoints: latestSnapshot.completedWaitpoints,
12421243
error: {
12431244
type: "INTERNAL_ERROR",
12441245
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)