diff --git a/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchRuntimeAttributes.scala b/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchRuntimeAttributes.scala index 4609af772d..bb6b4826e9 100644 --- a/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchRuntimeAttributes.scala +++ b/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchRuntimeAttributes.scala @@ -49,7 +49,8 @@ final case class GcpBatchRuntimeAttributes(cpu: Int Refined Positive, continueOnReturnCode: ContinueOnReturnCode, noAddress: Boolean, useDockerImageCache: Option[Boolean], - checkpointFilename: Option[String] + checkpointFilename: Option[String], + standardMachineType: Option[String] ) object GcpBatchRuntimeAttributes { @@ -85,6 +86,8 @@ object GcpBatchRuntimeAttributes { UseDockerImageCacheKey ).optional + val StandardMachineTypeKey = "StandardMachineType" + val CheckpointFileKey = "checkpointFile" private val checkpointFileValidationInstance = new StringRuntimeAttributesValidation(CheckpointFileKey).optional @@ -98,6 +101,8 @@ object GcpBatchRuntimeAttributes { ) private def cpuPlatformValidation(runtimeConfig: Option[Config]): OptionalRuntimeAttributesValidation[String] = cpuPlatformValidationInstance + private def standardMachineTypeValidation(runtimeConfig: Option[Config]): OptionalRuntimeAttributesValidation[String] = + new StringRuntimeAttributesValidation(StandardMachineTypeKey).optional private def gpuTypeValidation(runtimeConfig: Option[Config]): OptionalRuntimeAttributesValidation[GpuType] = GpuTypeValidation.optional @@ -171,7 +176,8 @@ object GcpBatchRuntimeAttributes { bootDiskSizeValidation(runtimeConfig), useDockerImageCacheValidation(runtimeConfig), checkpointFileValidationInstance, - dockerValidation + dockerValidation, + standardMachineTypeValidation(runtimeConfig) ) } @@ -228,6 +234,10 @@ object GcpBatchRuntimeAttributes { useDockerImageCacheValidation(runtimeAttrsConfig).key, validatedRuntimeAttributes ) + val standardMachineType: Option[String] = RuntimeAttributesValidation.extractOption( + standardMachineTypeValidation(runtimeAttrsConfig).key, + validatedRuntimeAttributes + ) new GcpBatchRuntimeAttributes( cpu = cpu, @@ -243,7 +253,8 @@ object GcpBatchRuntimeAttributes { continueOnReturnCode = continueOnReturnCode, noAddress = noAddress, useDockerImageCache = useDockerImageCache, - checkpointFilename = checkpointFileName + checkpointFilename = checkpointFileName, + standardMachineType = standardMachineType ) }