mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-12-01 12:24:23 +01:00
chore: Update dist
This commit is contained in:
1 parent
9aa437c71f
commit
45e9b2361a
2 files changed
+18
-8
No files matched your search
+9
-4
@@ -49799,15 +49799,20 @@ async function retryAndBackoff(fn, isRetryable, maxRetries = 12, retries = 0, ba
|
|||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
if (!isRetryable) {
|
if (!isRetryable) {
|
||||||
|
core.debug(`retryAndBackoff: error is not retryable: ${errorMessage(err)}`);
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
// It's retryable, so sleep and retry.
|
// It's retryable, so sleep and retry.
|
||||||
await sleep(Math.random() * (2 ** retries * base));
|
const delay = Math.random() * (2 ** retries * base);
|
||||||
retries += 1;
|
const nextRetry = retries + 1;
|
||||||
if (retries >= maxRetries) {
|
core.debug(`retryAndBackoff: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. ` +
|
||||||
|
`Retrying after ${Math.floor(delay)}ms.`);
|
||||||
|
await sleep(delay);
|
||||||
|
if (nextRetry >= maxRetries) {
|
||||||
|
core.debug('retryAndBackoff: reached max retries; giving up.');
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
return await retryAndBackoff(fn, isRetryable, maxRetries, retries, base);
|
return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* c8 ignore start */
|
/* c8 ignore start */
|
||||||
|
|||||||
+9
-4
@@ -529,15 +529,20 @@ async function retryAndBackoff(fn, isRetryable, maxRetries = 12, retries = 0, ba
|
|||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
if (!isRetryable) {
|
if (!isRetryable) {
|
||||||
|
core.debug(`retryAndBackoff: error is not retryable: ${errorMessage(err)}`);
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
// It's retryable, so sleep and retry.
|
// It's retryable, so sleep and retry.
|
||||||
await sleep(Math.random() * (2 ** retries * base));
|
const delay = Math.random() * (2 ** retries * base);
|
||||||
retries += 1;
|
const nextRetry = retries + 1;
|
||||||
if (retries >= maxRetries) {
|
core.debug(`retryAndBackoff: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. ` +
|
||||||
|
`Retrying after ${Math.floor(delay)}ms.`);
|
||||||
|
await sleep(delay);
|
||||||
|
if (nextRetry >= maxRetries) {
|
||||||
|
core.debug('retryAndBackoff: reached max retries; giving up.');
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
return await retryAndBackoff(fn, isRetryable, maxRetries, retries, base);
|
return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* c8 ignore start */
|
/* c8 ignore start */
|
||||||
|
|||||||
Reference in new issue
Block a user