Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
}
Expand Down
4 changes: 3 additions & 1 deletion .github/spot-runner-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ async function requestAndWaitForSpot(config: ActionConfig): Promise<string> {
// wait 10 seconds
await new Promise((r) => setTimeout(r, 5000 * 2 ** backoff));
backoff += 1;
core.info("Polling to see if we somehow have an instance up");
instanceId = await ec2Client.getInstancesForTags("running")[0]?.instanceId;
}
if (instanceId) {
core.info("Successfully requested instance with ID " + instanceId);
core.info("Successfully requested/found instance with ID " + instanceId);
break;
}
}
Expand Down