Skip to content

Commit

Permalink
chore(ci): dont look for tags if pure spot (#6446)
Browse files Browse the repository at this point in the history
This caused testers to look for invalid tags
  • Loading branch information
ludamad authored May 16, 2024
1 parent 8a71fd5 commit 1d8acfe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,10 @@ 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 (config.githubActionRunnerConcurrency > 0) {
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/found instance with ID " + instanceId);
Expand Down
6 changes: 4 additions & 2 deletions .github/spot-runner-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ 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 (config.githubActionRunnerConcurrency > 0) {
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/found instance with ID " + instanceId);
Expand Down

0 comments on commit 1d8acfe

Please sign in to comment.