Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mcovarr committed Sep 16, 2024
1 parent 893df18 commit 5fed7d7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ object GcpBatchConfigurationAttributes
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."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ sealed trait GcpBatchLogsPolicy extends Product with Serializable

object GcpBatchLogsPolicy {
case object CloudLogging extends GcpBatchLogsPolicy
case object Path extends GcpBatchLogsPolicy
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,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."
Expand Down

0 comments on commit 5fed7d7

Please sign in to comment.