Skip to content
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
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 @@ -245,7 +245,7 @@ class Ec2Instance {
const client = yield this.getEc2Client();
// NOTE: This should be deterministic or we will create a launch template each time
const userData = yield new userdata_1.UserData(this.config).getUserData();
const ec2InstanceTypeHash = this.getHashOfStringArray(this.config.ec2InstanceType.concat([userData]).concat([JSON.stringify(this.tags)]));
const ec2InstanceTypeHash = this.getHashOfStringArray(this.config.ec2InstanceType.concat([userData, JSON.stringify(this.tags), this.config.ec2KeyName]));
const launchTemplateName = "aztec-packages-spot-" + this.config.ec2AmiId + "-" + ec2InstanceTypeHash;
const launchTemplateParams = {
LaunchTemplateName: launchTemplateName,
Expand All @@ -258,6 +258,7 @@ class Ec2Instance {
MemoryMiB: { Min: 0 },
AllowedInstanceTypes: this.config.ec2InstanceType,
},
KeyName: this.config.ec2KeyName,
UserData: userData,
TagSpecifications: [
{
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 @@ -161,7 +161,7 @@ export class Ec2Instance {
// NOTE: This should be deterministic or we will create a launch template each time
const userData = await new UserData(this.config).getUserData();
const ec2InstanceTypeHash = this.getHashOfStringArray(
this.config.ec2InstanceType.concat([userData]).concat([JSON.stringify(this.tags)])
this.config.ec2InstanceType.concat([userData, JSON.stringify(this.tags), this.config.ec2KeyName])
);
const launchTemplateName =
"aztec-packages-spot-" + this.config.ec2AmiId + "-" + ec2InstanceTypeHash;
Expand All @@ -177,6 +177,7 @@ export class Ec2Instance {
MemoryMiB: { Min: 0 },
AllowedInstanceTypes: this.config.ec2InstanceType,
},
KeyName: this.config.ec2KeyName,
UserData: userData,
TagSpecifications: [
{
Expand Down