Skip to content

Commit ebb7193

Browse files
authored
snapshot status should remain EXECUTING for short retry delays (#1902)
1 parent f12141b commit ebb7193

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ export class RunAttemptSystem {
739739
{
740740
run,
741741
snapshot: {
742-
executionStatus: "PENDING_EXECUTING",
742+
executionStatus: "EXECUTING",
743743
description: "Attempt failed with a short delay, starting a new attempt",
744744
},
745745
previousSnapshotId: latestSnapshot.id,

internal-packages/run-engine/src/engine/tests/attemptFailures.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ describe("RunEngine attempt failures", () => {
104104
},
105105
});
106106
expect(result.attemptStatus).toBe("RETRY_IMMEDIATELY");
107-
expect(result.snapshot.executionStatus).toBe("PENDING_EXECUTING");
107+
expect(result.snapshot.executionStatus).toBe("EXECUTING");
108108
expect(result.run.status).toBe("RETRYING_AFTER_FAILURE");
109109

110110
//state should be pending
111111
const executionData3 = await engine.getRunExecutionData({ runId: run.id });
112112
assertNonNullable(executionData3);
113-
expect(executionData3.snapshot.executionStatus).toBe("PENDING_EXECUTING");
113+
expect(executionData3.snapshot.executionStatus).toBe("EXECUTING");
114114
//only when the new attempt is created, should the attempt be increased
115115
expect(executionData3.run.attemptNumber).toBe(1);
116116
expect(executionData3.run.status).toBe("RETRYING_AFTER_FAILURE");

internal-packages/run-engine/src/engine/tests/waitpoints.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ describe("RunEngine Waitpoints", () => {
239239
},
240240
});
241241
expect(failResult.attemptStatus).toBe("RETRY_IMMEDIATELY");
242-
expect(failResult.snapshot.executionStatus).toBe("PENDING_EXECUTING");
242+
expect(failResult.snapshot.executionStatus).toBe("EXECUTING");
243243
expect(failResult.run.attemptNumber).toBe(1);
244244
expect(failResult.run.status).toBe("RETRYING_AFTER_FAILURE");
245245

246246
const executionData2 = await engine.getRunExecutionData({ runId: run.id });
247247
assertNonNullable(executionData2);
248-
expect(executionData2.snapshot.executionStatus).toBe("PENDING_EXECUTING");
248+
expect(executionData2.snapshot.executionStatus).toBe("EXECUTING");
249249
expect(executionData2.run.attemptNumber).toBe(1);
250250
expect(executionData2.run.status).toBe("RETRYING_AFTER_FAILURE");
251251
expect(executionData2.completedWaitpoints.length).toBe(0);

0 commit comments

Comments
 (0)