From 75e5d3545b0fd0ff37c02f5a7cde066c2b4c72f4 Mon Sep 17 00:00:00 2001 From: Miguel Covarrubias Date: Mon, 16 Sep 2024 12:11:05 -0400 Subject: [PATCH] cleanup --- .../google/batch/api/GcpBatchRequestFactoryImpl.scala | 2 -- .../batch/models/GcpBatchConfigurationAttributes.scala | 1 - .../backend/google/batch/models/GcpBatchLogsPolicy.scala | 1 - .../batch/models/GcpBatchConfigurationAttributesSpec.scala | 6 ------ 4 files changed, 10 deletions(-) diff --git a/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/api/GcpBatchRequestFactoryImpl.scala b/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/api/GcpBatchRequestFactoryImpl.scala index 875f7319764..41c18e192e8 100644 --- a/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/api/GcpBatchRequestFactoryImpl.scala +++ b/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/api/GcpBatchRequestFactoryImpl.scala @@ -241,8 +241,6 @@ class GcpBatchRequestFactoryImpl()(implicit gcsTransferConfiguration: GcsTransfe val logsPolicy = data.gcpBatchParameters.batchAttributes.logsPolicy match { case GcpBatchLogsPolicy.CloudLogging => LogsPolicy.newBuilder.setDestination(Destination.CLOUD_LOGGING).build - case GcpBatchLogsPolicy.Path => - ??? } val googleLabels = data.createParameters.googleLabels.map(l => Label(l.key, l.value)) diff --git a/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchConfigurationAttributes.scala b/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchConfigurationAttributes.scala index cf71a1a3426..e594819b10f 100644 --- a/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchConfigurationAttributes.scala +++ b/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchConfigurationAttributes.scala @@ -216,7 +216,6 @@ object GcpBatchConfigurationAttributes extends GcpBatchReferenceFilesMappingOper val logsPolicy: ErrorOr[GcpBatchLogsPolicy] = validate { backendConfig.as[Option[String]]("batch.logs-policy").getOrElse("CLOUD_LOGGING") match { case "CLOUD_LOGGING" => GcpBatchLogsPolicy.CloudLogging - case "PATH" => GcpBatchLogsPolicy.Path case other => throw new IllegalArgumentException( s"Unrecognized logs policy entry: $other. Supported strategies are CLOUD_LOGGING and PATH." diff --git a/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchLogsPolicy.scala b/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchLogsPolicy.scala index bcc8fab8d13..d43714e4956 100644 --- a/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchLogsPolicy.scala +++ b/supportedBackends/google/batch/src/main/scala/cromwell/backend/google/batch/models/GcpBatchLogsPolicy.scala @@ -4,5 +4,4 @@ sealed trait GcpBatchLogsPolicy extends Product with Serializable object GcpBatchLogsPolicy { case object CloudLogging extends GcpBatchLogsPolicy - case object Path extends GcpBatchLogsPolicy } diff --git a/supportedBackends/google/batch/src/test/scala/cromwell/backend/google/batch/models/GcpBatchConfigurationAttributesSpec.scala b/supportedBackends/google/batch/src/test/scala/cromwell/backend/google/batch/models/GcpBatchConfigurationAttributesSpec.scala index 19805debbed..39dc0a69b13 100644 --- a/supportedBackends/google/batch/src/test/scala/cromwell/backend/google/batch/models/GcpBatchConfigurationAttributesSpec.scala +++ b/supportedBackends/google/batch/src/test/scala/cromwell/backend/google/batch/models/GcpBatchConfigurationAttributesSpec.scala @@ -135,12 +135,6 @@ class GcpBatchConfigurationAttributesSpec gcpBatchAttributes.logsPolicy should be(GcpBatchLogsPolicy.CloudLogging) } - it should "parse logs-policy = PATH" in { - val backendConfig = ConfigFactory.parseString(configString(batch = "logs-policy = PATH")) - val gcpBatchAttributes = GcpBatchConfigurationAttributes(googleConfig, backendConfig, "batch") - gcpBatchAttributes.logsPolicy should be(GcpBatchLogsPolicy.Path) - } - it should "reject invalid logs-policy" in { val expected = "Google Cloud Batch configuration is not valid: Errors:\nUnrecognized logs policy entry: INVALID. Supported strategies are CLOUD_LOGGING and PATH."