File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
apps/kubernetes-provider/src Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ export class TaskMonitor {
140
140
const containerState = this . #getContainerStateSummary( containerStatus . state ) ;
141
141
const exitCode = containerState . exitCode ?? - 1 ;
142
142
143
- if ( exitCode === EXIT_CODE_ALREADY_HANDLED ) {
143
+ if ( exitCode === EXIT_CODE_ALREADY_HANDLED || exitCode === EXIT_CODE_CHILD_NONZERO ) {
144
144
this . #logger. debug ( "Ignoring pod failure, already handled by worker" , {
145
145
podName,
146
146
} ) ;
@@ -186,9 +186,8 @@ export class TaskMonitor {
186
186
break ;
187
187
case "OOMKilled" :
188
188
overrideCompletion = true ;
189
- reason = `${
190
- exitCode === EXIT_CODE_CHILD_NONZERO ? "Child process" : "Parent process"
191
- } ran out of memory! Try choosing a machine preset with more memory for this task.`;
189
+ reason =
190
+ "[TaskMonitor] Your task ran out of memory. Try increasing the machine specs. If this doesn't fix it there might be a memory leak." ;
192
191
errorCode = TaskRunErrorCodes . TASK_PROCESS_OOM_KILLED ;
193
192
break ;
194
193
default :
Original file line number Diff line number Diff line change @@ -519,12 +519,12 @@ class ProdWorker {
519
519
520
520
logger . log ( "completion acknowledged" , { willCheckpointAndRestore, shouldExit } ) ;
521
521
522
- const exitCode =
522
+ const isNonZeroExitError =
523
523
! completion . ok &&
524
524
completion . error . type === "INTERNAL_ERROR" &&
525
- completion . error . code === TaskRunErrorCodes . TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE
526
- ? EXIT_CODE_CHILD_NONZERO
527
- : 0 ;
525
+ completion . error . code === TaskRunErrorCodes . TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE ;
526
+
527
+ const exitCode = isNonZeroExitError ? EXIT_CODE_CHILD_NONZERO : 0 ;
528
528
529
529
if ( shouldExit ) {
530
530
// Exit after completion, without any retrying
Original file line number Diff line number Diff line change
1
+ /** This was used by the old build system in case of indexing failures */
1
2
export const EXIT_CODE_ALREADY_HANDLED = 111 ;
2
- export const EXIT_CODE_CHILD_NONZERO = 112 ;
3
+ /** This means what it says and is only set once we have completed the attempt */
4
+ export const EXIT_CODE_CHILD_NONZERO = 112 ;
You can’t perform that action at this time.
0 commit comments