Skip to content

Commit

Permalink
chore(ci): fix on-demand starting (#6434)
Browse files Browse the repository at this point in the history
Saw this when we requested too many spots. Should up that limit, but
meanwhile the fallback to on-demand should work
  • Loading branch information
ludamad authored May 15, 2024
1 parent 80674d9 commit c3efb9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,11 @@ class Ec2Instance {
SubnetId: this.config.githubActionRunnerConcurrency > 0 ? this.config.ec2SubnetId : undefined,
})),
};
const clientToken = this.config.clientToken ? this.config.clientToken + ",spot=" + useOnDemand : undefined;
const createFleetRequest = {
Type: "instant",
LaunchTemplateConfigs: [fleetLaunchConfig],
ClientToken: this.config.clientToken || undefined,
ClientToken: clientToken,
SpotOptions: {
AllocationStrategy: "capacity-optimized",
},
Expand Down
3 changes: 2 additions & 1 deletion .github/spot-runner-action/src/ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,11 @@ export class Ec2Instance {
SubnetId: this.config.githubActionRunnerConcurrency > 0 ? this.config.ec2SubnetId : undefined,
})),
};
const clientToken = this.config.clientToken ?this.config.clientToken + ",spot=" + useOnDemand : undefined;
const createFleetRequest: CreateFleetRequest = {
Type: "instant",
LaunchTemplateConfigs: [fleetLaunchConfig],
ClientToken: this.config.clientToken || undefined,
ClientToken: clientToken,
SpotOptions: {
AllocationStrategy: "capacity-optimized",
},
Expand Down

0 comments on commit c3efb9c

Please sign in to comment.