Skip to content

Commit 2de9e8d

Browse files
committed
Only retry again if the machine is different from the original
1 parent 21ac5ce commit 2de9e8d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,11 @@ export class CompleteAttemptService extends BaseService {
260260
execution,
261261
});
262262

263-
if (retryConfig?.outOfMemory?.machine) {
263+
if (
264+
retryConfig?.outOfMemory?.machine &&
265+
retryConfig.outOfMemory.machine !== taskRunAttempt.taskRun.machinePreset
266+
) {
267+
//we will retry
264268
isOOMRetry = true;
265269
retriableError = true;
266270
executionRetry = FailedTaskRunRetryHelper.getExecutionRetry({
@@ -479,6 +483,7 @@ export class CompleteAttemptService extends BaseService {
479483
if (forceRequeue) {
480484
logger.debug("[CompleteAttemptService] Forcing retry via queue", { runId: run.id });
481485
await retryViaQueue();
486+
return;
482487
}
483488

484489
// Workers that never checkpoint between attempts will exit after completing their current attempt if the retry delay exceeds the threshold

0 commit comments

Comments
 (0)