Skip to content

Commit e08b456

Browse files
committed
Improve checkpoint restore logging
1 parent 79da0ca commit e08b456

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

apps/webapp/app/v3/services/restoreCheckpoint.server.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class RestoreCheckpointService extends BaseService {
4545
});
4646

4747
if (!checkpointEvent) {
48-
logger.error("Checkpoint event not found", params);
48+
logger.error("Checkpoint event not found", { eventId: params.eventId });
4949
return;
5050
}
5151

@@ -56,16 +56,20 @@ export class RestoreCheckpointService extends BaseService {
5656

5757
if (!runIsRestorable) {
5858
logger.error("Run is unrestorable", {
59-
id: checkpoint.runId,
60-
status: checkpoint.run.status,
59+
eventId: params.eventId,
60+
runId: checkpoint.runId,
61+
runStatus: checkpoint.run.status,
62+
attemptId: checkpoint.attemptId,
6163
});
6264
return;
6365
}
6466

6567
if (!attemptIsRestorable && !params.isRetry) {
6668
logger.error("Attempt is unrestorable", {
67-
id: checkpoint.attemptId,
68-
status: checkpoint.attempt.status,
69+
eventId: params.eventId,
70+
runId: checkpoint.runId,
71+
attemptId: checkpoint.attemptId,
72+
attemptStatus: checkpoint.attempt.status,
6973
});
7074
return;
7175
}
@@ -75,6 +79,8 @@ export class RestoreCheckpointService extends BaseService {
7579

7680
if (!machine.success) {
7781
logger.error("Failed to parse machine config", {
82+
eventId: params.eventId,
83+
runId: checkpoint.runId,
7884
attemptId: checkpoint.attemptId,
7985
machineConfig: checkpoint.attempt.backgroundWorkerTask.machineConfig,
8086
});
@@ -90,6 +96,8 @@ export class RestoreCheckpointService extends BaseService {
9096

9197
if (restoreEvent) {
9298
logger.error("Restore event already exists", {
99+
runId: checkpoint.runId,
100+
attemptId: checkpoint.attemptId,
93101
checkpointId: checkpoint.id,
94102
restoreEventId: restoreEvent.id,
95103
});

0 commit comments

Comments
 (0)