From 9fd94c092ae2c6b37ea80c171c93d818601421e8 Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 15 May 2024 22:32:25 +0000 Subject: [PATCH] fix --- .github/spot-runner-action/dist/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/spot-runner-action/dist/index.js b/.github/spot-runner-action/dist/index.js index 1b271e11402..b34f8c07dc9 100644 --- a/.github/spot-runner-action/dist/index.js +++ b/.github/spot-runner-action/dist/index.js @@ -708,6 +708,7 @@ function pollSpotStatus(config, ec2Client, ghClient) { }); } function requestAndWaitForSpot(config) { + var _a; return __awaiter(this, void 0, void 0, function* () { // subaction is 'start' or 'restart'estart' const ec2Client = new ec2_1.Ec2Instance(config); @@ -747,9 +748,11 @@ function requestAndWaitForSpot(config) { // wait 10 seconds yield new Promise((r) => setTimeout(r, 5000 * Math.pow(2, backoff))); backoff += 1; + core.info("Polling to see if we somehow have an instance up"); + instanceId = yield ((_a = ec2Client.getInstancesForTags("running")[0]) === null || _a === void 0 ? void 0 : _a.instanceId); } if (instanceId) { - core.info("Successfully requested instance with ID " + instanceId); + core.info("Successfully requested/found instance with ID " + instanceId); break; } }