Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): dont look for tags if pure spot #6446

Merged
merged 1 commit into from
May 16, 2024
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
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 @@ -748,8 +748,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
Loading