From 9155c42c09d7f91a2958fb682f47919ea4c38ec1 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Wed, 30 Apr 2025 14:44:40 -0500 Subject: [PATCH] Do not retry /renewjob on 404 (#3828) --- src/Runner.Common/RunServer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Runner.Common/RunServer.cs b/src/Runner.Common/RunServer.cs index 19b389a32..b57d2754b 100644 --- a/src/Runner.Common/RunServer.cs +++ b/src/Runner.Common/RunServer.cs @@ -94,7 +94,9 @@ namespace GitHub.Runner.Common { CheckConnection(); return RetryRequest( - async () => await _runServiceHttpClient.RenewJobAsync(requestUri, planId, jobId, cancellationToken), cancellationToken); + async () => await _runServiceHttpClient.RenewJobAsync(requestUri, planId, jobId, cancellationToken), cancellationToken, + shouldRetry: ex => + ex is not TaskOrchestrationJobNotFoundException); // HTTP status 404 } } }