File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed
internal-packages/run-engine/src/engine/systems Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -270,11 +270,25 @@ export class CheckpointSystem {
270
270
const snapshot = await getLatestExecutionSnapshot ( prisma , runId ) ;
271
271
272
272
if ( snapshot . id !== snapshotId ) {
273
- throw new ServiceValidationError ( "Snapshot ID doesn't match the latest snapshot" , 400 ) ;
273
+ throw new ServiceValidationError (
274
+ "Snapshot ID doesn't match the latest snapshot in continueRunExecution" ,
275
+ 400 ,
276
+ {
277
+ snapshotId,
278
+ latestSnapshotId : snapshot . id ,
279
+ }
280
+ ) ;
274
281
}
275
282
276
283
if ( ! isPendingExecuting ( snapshot . executionStatus ) ) {
277
- throw new ServiceValidationError ( "Snapshot is not in a valid state to continue" , 400 ) ;
284
+ throw new ServiceValidationError (
285
+ "Snapshot is not in a valid state to continue in continueRunExecution" ,
286
+ 400 ,
287
+ {
288
+ snapshotId,
289
+ snapshotStatus : snapshot . executionStatus ,
290
+ }
291
+ ) ;
278
292
}
279
293
280
294
// Get the run and update the status
Original file line number Diff line number Diff line change @@ -318,9 +318,16 @@ export class RunAttemptSystem {
318
318
//if there is a big delay between the snapshot and the attempt, the snapshot might have changed
319
319
//we just want to log because elsewhere it should have been put back into a state where it can be attempted
320
320
this . $ . logger . warn (
321
- "RunEngine.createRunAttempt(): snapshot has changed since the attempt was created, ignoring."
321
+ "RunEngine.createRunAttempt(): snapshot has changed since the attempt was created, ignoring." ,
322
+ {
323
+ snapshotId,
324
+ latestSnapshotId : latestSnapshot . id ,
325
+ }
322
326
) ;
323
- throw new ServiceValidationError ( "Snapshot changed" , 409 ) ;
327
+ throw new ServiceValidationError ( "Snapshot changed inside startRunAttempt" , 409 , {
328
+ snapshotId,
329
+ latestSnapshotId : latestSnapshot . id ,
330
+ } ) ;
324
331
}
325
332
326
333
const taskRun = await prisma . taskRun . findFirst ( {
You can’t perform that action at this time.
0 commit comments