Skip to content

Commit 325c30c

Browse files
semihokurnarasamdya
authored andcommitted
Merged PR 750781: Fix retry logic for low disk space
When there is a low disk space, we cancel PipQueue and running pips by triggering SchedulerCancellationToken. The pips get cancelled and they have SandboxedProcessPipExecutionStatus.Canceled. However, we do not set RetryInfo for those pips, so Canceled sandboxed result is translated to PipResultStatus.Failed due to the lack of RetryInfo. The orchestrator receives pip results with Failed with no error logs, so we log DistributionPipFailedOnWorker errors. We should have set RetryInfo for those cancelled pips. Because we check environment.Context.CancellationToken instead of SchedulerCancellationToken, we skip setting RetryInfo. Context.CancellationToken is triggered when CTRL-C is pressed. SchedulerCancellationToken is triggered when we request termination in Scheduler. Related work items: #2121638
1 parent ac8d185 commit 325c30c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Public/Src/Engine/Scheduler/PipExecutor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2215,7 +2215,7 @@ private static async Task<SandboxedProcessPipExecutionResult> ExecutePipAndHandl
22152215
expectedCommitMb: expectedMemoryCounters.PeakCommitSizeMb,
22162216
cancelMilliseconds: (int)(cancelTime?.TotalMilliseconds ?? 0));
22172217
}
2218-
else if (environment.Context.CancellationToken.IsCancellationRequested
2218+
else if (environment.SchedulerCancellationToken.IsCancellationRequested
22192219
&& environment.Configuration.Distribution.BuildRole == DistributedBuildRoles.Worker)
22202220
{
22212221
// The pip was cancelled due to the scheduler terminating on this distributed worker.

0 commit comments

Comments
 (0)