Skip to content

Commit 4f9a86e

Browse files
committed
Fix batchStorage not being a number.
1 parent 28b5af9 commit 4f9a86e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.tools/test/stacks/plugin/typescript/plugin_stack.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class PluginStack extends cdk.Stack {
2424
private adminAccountId: string;
2525
private batchMemory: string;
2626
private batchVcpus: string;
27-
private batchStorage: string;
27+
private batchStorage: number;
2828

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

5051
const [jobDefinition, jobQueue] = this.initBatchFargate();
@@ -141,7 +142,7 @@ class PluginStack extends cdk.Stack {
141142
},
142143
],
143144
ephemeralStorage: {
144-
sizeInGib: this.batchStorage,
145+
sizeInGiB: this.batchStorage,
145146
},
146147
environment: variableConfigJson,
147148
},

0 commit comments

Comments
 (0)