Skip to content

Commit

Permalink
Fix batchStorage not being a number.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSouther committed Nov 11, 2024
1 parent 28b5af9 commit 4f9a86e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .tools/test/stacks/plugin/typescript/plugin_stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PluginStack extends cdk.Stack {
private adminAccountId: string;
private batchMemory: string;
private batchVcpus: string;
private batchStorage: string;
private batchStorage: number;

constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
Expand All @@ -44,7 +44,8 @@ class PluginStack extends cdk.Stack {
// https://docs.aws.amazon.com/batch/latest/APIReference/API_ResourceRequirement.html
this.batchMemory = acctConfig[`${toolName}`]?.memory ?? "16384"; // MiB
this.batchVcpus = acctConfig[`${toolName}`]?.vcpus ?? "4"; // CPUs
this.batchStorage = acctConfig[`${toolName}`]?.storage ?? "20"; // GiB
const batchStorage = Number(acctConfig[`${toolName}`]?.storage ?? undefined);
this.batchStorage = isNaN(batchStorage) ? 20 : batchStorage; // GiB
}

const [jobDefinition, jobQueue] = this.initBatchFargate();
Expand Down Expand Up @@ -141,7 +142,7 @@ class PluginStack extends cdk.Stack {
},
],
ephemeralStorage: {
sizeInGib: this.batchStorage,
sizeInGiB: this.batchStorage,
},
environment: variableConfigJson,
},
Expand Down

0 comments on commit 4f9a86e

Please sign in to comment.