Skip to content

Commit 80d22c0

Browse files
remove retry only on certain errors. maxRetries set to 3 instead of 5.
1 parent 66d7daa commit 80d22c0

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/main.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ async function retryWithBackoff<T>(
4848
}
4949
}
5050

51-
/**
52-
* Check if an error is a buildkit socket connection error
53-
*/
54-
function isBuildkitSocketError(error: Error): boolean {
55-
return error.message.includes('/run/buildkit/buildkitd.sock') ||
56-
error.message.includes('failed to list workers') ||
57-
error.message.includes('connection error');
58-
}
59-
6051
actionsToolkit.run(
6152
// main
6253
async () => {
@@ -230,14 +221,9 @@ actionsToolkit.run(
230221
// If the command takes too long, we'll get the timeout error instead
231222
return Promise.race([execPromise, timeoutPromise]);
232223
},
233-
5, // maxRetries - retry up to 5 times for buildkit initialization
224+
3, // maxRetries - retry up to 3 times for buildkit initialization
234225
1000, // initialDelay - start with 1 second
235-
15000, // maxDelay - cap at 15 seconds
236-
(error) => {
237-
// Retry on buildkit socket errors or timeouts
238-
return isBuildkitSocketError(error) ||
239-
error.message.includes('Timeout exceeded while waiting for buildkit');
240-
}
226+
15000 // maxDelay - cap at 15 seconds
241227
);
242228
} catch (error) {
243229
// Log the warning but continue - this matches current behavior where builds still succeed

0 commit comments

Comments
 (0)