diff --git a/patches/last_processed_commit.txt b/patches/last_processed_commit.txt index 70d92a1f938..68bcc5659eb 100644 --- a/patches/last_processed_commit.txt +++ b/patches/last_processed_commit.txt @@ -1 +1 @@ -b06c585762228079bcd10d6426e2c35598305761 +4550db3c89dddf3c31c7f4e5e86215ee8a8217e2 diff --git a/patches/runner-main-sdk8-ppc64le.patch b/patches/runner-main-sdk8-ppc64le.patch index d38e8da7b70..4e42838f949 100644 --- a/patches/runner-main-sdk8-ppc64le.patch +++ b/patches/runner-main-sdk8-ppc64le.patch @@ -284,4 +284,4 @@ index 056a312e..3f9a3679 100644 -# From upstream commit: b06c585762228079bcd10d6426e2c35598305761 +# From upstream commit: 4550db3c89dddf3c31c7f4e5e86215ee8a8217e2 diff --git a/patches/runner-main-sdk8-s390x.patch b/patches/runner-main-sdk8-s390x.patch index d38e8da7b70..4e42838f949 100644 --- a/patches/runner-main-sdk8-s390x.patch +++ b/patches/runner-main-sdk8-s390x.patch @@ -284,4 +284,4 @@ index 056a312e..3f9a3679 100644 -# From upstream commit: b06c585762228079bcd10d6426e2c35598305761 +# From upstream commit: 4550db3c89dddf3c31c7f4e5e86215ee8a8217e2 diff --git a/src/Runner.Worker/ActionManager.cs b/src/Runner.Worker/ActionManager.cs index 685240b92a9..133129a0177 100644 --- a/src/Runner.Worker/ActionManager.cs +++ b/src/Runner.Worker/ActionManager.cs @@ -1446,6 +1446,11 @@ private async Task DownloadRepositoryArchive(IExecutionContext executionContext, // It doesn't make sense to retry in this case, so just stop throw new ActionNotFoundException(new Uri(downloadUrl), requestId); } + else if (response.StatusCode == HttpStatusCode.Forbidden) + { + // It doesn't make sense to retry in this case, so just stop + throw new AccessDeniedException($"Access denied to '{downloadUrl}' ({requestId})"); + } else { // Something else bad happened, let's go to our retry logic @@ -1469,6 +1474,11 @@ private async Task DownloadRepositoryArchive(IExecutionContext executionContext, Trace.Info($"The action at '{downloadUrl}' does not exist"); throw; } + catch (AccessDeniedException) + { + Trace.Info($"Access denied to '{downloadUrl}'"); + throw; + } catch (Exception ex) when (retryCount < 2) { retryCount++; @@ -1494,7 +1504,7 @@ private async Task DownloadRepositoryArchive(IExecutionContext executionContext, } } } - catch (Exception ex) when (!(ex is OperationCanceledException) && !executionContext.CancellationToken.IsCancellationRequested) + catch (Exception ex) when (!(ex is AccessDeniedException) && !(ex is OperationCanceledException) && !executionContext.CancellationToken.IsCancellationRequested) { Trace.Error($"Failed to download archive '{downloadUrl}' after {retryCount + 1} attempts."); Trace.Error(ex);