Skip to content

Commit

Permalink
hotfix runner checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad committed May 13, 2024
1 parent ee8d581 commit e69370e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ function pollSpotStatus(config, ec2Client, ghClient) {
}
try {
core.info("Found ec2 instance, looking for runners.");
if (yield ghClient.hasRunner([config.githubJobId])) {
if (process.env.WAIT_FOR_RUNNERS === "false" || (yield ghClient.hasRunner([config.githubJobId]))) {
// we have runners
return instances[0].InstanceId;
}
Expand Down
2 changes: 1 addition & 1 deletion .github/spot-runner-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function pollSpotStatus(
}
try {
core.info("Found ec2 instance, looking for runners.");
if (await ghClient.hasRunner([config.githubJobId])) {
if (process.env.WAIT_FOR_RUNNERS === "false" || await ghClient.hasRunner([config.githubJobId])) {
// we have runners
return instances[0].InstanceId!;
}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
# kludge until we move away from runners
WAIT_FOR_RUNNERS: false

jobs:
setup:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/setup-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
# kludge until we move away from runners
WAIT_FOR_RUNNERS: true

jobs:
start-builder:
Expand Down

0 comments on commit e69370e

Please sign in to comment.