From 4f9a86e0d25c0b923a7451be6c1ff997c41dc44b Mon Sep 17 00:00:00 2001 From: David Souther Date: Tue, 5 Nov 2024 10:12:35 -0500 Subject: [PATCH] Fix batchStorage not being a number. --- .tools/test/stacks/plugin/typescript/plugin_stack.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.tools/test/stacks/plugin/typescript/plugin_stack.ts b/.tools/test/stacks/plugin/typescript/plugin_stack.ts index 33d6b341dbe..a6edf6922b8 100644 --- a/.tools/test/stacks/plugin/typescript/plugin_stack.ts +++ b/.tools/test/stacks/plugin/typescript/plugin_stack.ts @@ -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); @@ -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(); @@ -141,7 +142,7 @@ class PluginStack extends cdk.Stack { }, ], ephemeralStorage: { - sizeInGib: this.batchStorage, + sizeInGiB: this.batchStorage, }, environment: variableConfigJson, },