Skip to content

Commit 56a880f

Browse files
authored
Fix dequeue snapshot batch ids (#1893)
* Pass the batchId through from previous snapshots when dequeuing * Fix and test for resuming batch after checkpoint
1 parent b322cf1 commit 56a880f

File tree

4 files changed

+407
-1
lines changed

4 files changed

+407
-1
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ export class CheckpointSystem {
283283
environmentType: snapshot.environmentType,
284284
projectId: snapshot.projectId,
285285
organizationId: snapshot.organizationId,
286+
batchId: snapshot.batchId ?? undefined,
286287
completedWaitpoints: snapshot.completedWaitpoints,
287288
workerId,
288289
runnerId,

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

+1
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ export class DequeueSystem {
374374
projectId: snapshot.projectId,
375375
organizationId: snapshot.organizationId,
376376
checkpointId: snapshot.checkpointId ?? undefined,
377+
batchId: snapshot.batchId ?? undefined,
377378
completedWaitpoints: snapshot.completedWaitpoints,
378379
workerId,
379380
runnerId,

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

+2
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ export class RunAttemptSystem {
218218
environmentType: latestSnapshot.environmentType,
219219
projectId: latestSnapshot.projectId,
220220
organizationId: latestSnapshot.organizationId,
221+
batchId: latestSnapshot.batchId ?? undefined,
222+
completedWaitpoints: latestSnapshot.completedWaitpoints,
221223
workerId,
222224
runnerId,
223225
});

0 commit comments

Comments
 (0)