Throw TimeoutException instead of OperationCanceledException on the final retry in DownloadRepositoryAction. (#2895)

This commit is contained in:
Tingluo Huang
2023-09-28 09:35:55 -04:00
committed by GitHub
parent 462337a4a4
commit 2a6f271afa

View File

@@ -854,6 +854,11 @@ namespace GitHub.Runner.Worker
Trace.Info("Action download has been cancelled.");
throw;
}
catch (OperationCanceledException ex) when (!executionContext.CancellationToken.IsCancellationRequested && retryCount >= 2)
{
Trace.Info($"Action download final retry timeout after {timeoutSeconds} seconds.");
throw new TimeoutException($"Action '{link}' download has timed out. Error: {ex.Message}");
}
catch (ActionNotFoundException)
{
Trace.Info($"The action at '{link}' does not exist");