Skip to content

Commit

Permalink
fix: don't take down runners with faulty runner check (#10019)
Browse files Browse the repository at this point in the history
Things work technically but this will cause interference unless merged

---------

Co-authored-by: Charlie Lye <[email protected]>
  • Loading branch information
ludamad and charlielye authored Nov 18, 2024
1 parent 74ed142 commit fc88517
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,11 @@ function pollSpotStatus(config, ec2Client, ghClient) {
}
try {
core.info("Found ec2 instance, looking for runners.");
if (process.env.WAIT_FOR_RUNNERS === "false" || (yield ghClient.hasRunner([config.githubJobId]))) {
// we have runners
return instances[0].InstanceId;
}
// TODO find out whatever happened here but we seem to not be able to wait for runners
//if (process.env.WAIT_FOR_RUNNERS === "false" || await ghClient.hasRunner([config.githubJobId])) {
// we have runners
return instances[0].InstanceId;
//}
}
catch (err) { }
// wait 10 seconds
Expand Down
5 changes: 3 additions & 2 deletions .github/spot-runner-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ async function pollSpotStatus(
}
try {
core.info("Found ec2 instance, looking for runners.");
if (process.env.WAIT_FOR_RUNNERS === "false" || await ghClient.hasRunner([config.githubJobId])) {
// TODO find out whatever happened here but we seem to not be able to wait for runners
//if (process.env.WAIT_FOR_RUNNERS === "false" || await ghClient.hasRunner([config.githubJobId])) {
// we have runners
return instances[0].InstanceId!;
}
//}
} catch (err) {}
// wait 10 seconds
await new Promise((r) => setTimeout(r, 10000));
Expand Down

0 comments on commit fc88517

Please sign in to comment.