Skip to content

Commit 7f804f3

Browse files
committed
middleware working and tests passing
1 parent 6ab74c4 commit 7f804f3

File tree

5 files changed

+358
-142
lines changed

5 files changed

+358
-142
lines changed

internal-packages/run-engine/src/engine/errors.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ export function runStatusFromError(error: TaskRunError): TaskRunStatus {
1313
//e.g. a bug
1414
switch (error.code) {
1515
case "RECURSIVE_WAIT_DEADLOCK":
16+
case "TASK_INPUT_ERROR":
17+
case "TASK_OUTPUT_ERROR":
18+
case "TASK_MIDDLEWARE_ERROR":
1619
return "COMPLETED_WITH_ERRORS";
1720
case "TASK_RUN_CANCELLED":
1821
return "CANCELED";
@@ -41,8 +44,6 @@ export function runStatusFromError(error: TaskRunError): TaskRunStatus {
4144
case "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS":
4245
case "TASK_HAS_N0_EXECUTION_SNAPSHOT":
4346
case "GRACEFUL_EXIT_TIMEOUT":
44-
case "TASK_INPUT_ERROR":
45-
case "TASK_OUTPUT_ERROR":
4647
case "POD_EVICTED":
4748
case "POD_UNKNOWN_ERROR":
4849
case "TASK_EXECUTION_ABORTED":

packages/core/src/v3/errors.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ export function shouldRetryError(error: TaskRunError): boolean {
305305
case "HANDLE_ERROR_ERROR":
306306
case "TASK_INPUT_ERROR":
307307
case "TASK_OUTPUT_ERROR":
308+
case "TASK_MIDDLEWARE_ERROR":
308309
case "POD_EVICTED":
309310
case "POD_UNKNOWN_ERROR":
310311
case "TASK_EXECUTION_ABORTED":

packages/core/src/v3/schemas/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export const TaskRunInternalError = z.object({
165165
"TASK_RUN_CANCELLED",
166166
"TASK_INPUT_ERROR",
167167
"TASK_OUTPUT_ERROR",
168+
"TASK_MIDDLEWARE_ERROR",
168169
"HANDLE_ERROR_ERROR",
169170
"GRACEFUL_EXIT_TIMEOUT",
170171
"TASK_RUN_HEARTBEAT_TIMEOUT",

0 commit comments

Comments
 (0)