From 784d78404ac9145902c75dbe9898f872174350f4 Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 16 May 2024 12:12:02 -0400 Subject: [PATCH] fix: spot retry fixup (#6476) --- .github/spot-runner-action/dist/index.js | 3 +++ .github/spot-runner-action/src/ec2.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/spot-runner-action/dist/index.js b/.github/spot-runner-action/dist/index.js index 88bf44b6b03..e2097f03876 100644 --- a/.github/spot-runner-action/dist/index.js +++ b/.github/spot-runner-action/dist/index.js @@ -127,6 +127,9 @@ class Ec2Instance { this.client = new aws_sdk_1.default.EC2({ credentials: this.credentials, region: this.config.awsRegion, + maxRetries: 3, + // base 10 seconds for the exponential backoff, up to 3 times + retryDelayOptions: { base: 10000 }, }); this.tags = this.getTags(); } diff --git a/.github/spot-runner-action/src/ec2.ts b/.github/spot-runner-action/src/ec2.ts index 37026ed131e..3879b1dea1d 100644 --- a/.github/spot-runner-action/src/ec2.ts +++ b/.github/spot-runner-action/src/ec2.ts @@ -39,6 +39,9 @@ export class Ec2Instance { this.client = new AWS.EC2({ credentials: this.credentials, region: this.config.awsRegion, + maxRetries: 3, + // base 10 seconds for the exponential backoff, up to 3 times + retryDelayOptions: { base: 10000 }, }); this.tags = this.getTags();