diff --git a/build.sbt b/build.sbt index 5ac16afb9aa..760ea2cc4ac 100644 --- a/build.sbt +++ b/build.sbt @@ -150,7 +150,7 @@ lazy val centaur = project .dependsOn(womtool) lazy val services = project - .withLibrarySettings("cromwell-services") + .withLibrarySettings("cromwell-services", servicesDependencies) .dependsOn(databaseSql) .dependsOn(databaseMigration) .dependsOn(cloudSupport) diff --git a/engine/src/main/scala/cromwell/engine/io/gcs/GcsBatchFlow.scala b/engine/src/main/scala/cromwell/engine/io/gcs/GcsBatchFlow.scala index 2336ddffbf4..afbd929e8af 100644 --- a/engine/src/main/scala/cromwell/engine/io/gcs/GcsBatchFlow.scala +++ b/engine/src/main/scala/cromwell/engine/io/gcs/GcsBatchFlow.scala @@ -7,6 +7,8 @@ import akka.stream._ import akka.stream.scaladsl.{Flow, GraphDSL, MergePreferred, Partition} import com.google.api.client.googleapis.batch.BatchRequest import com.google.api.client.http.{HttpRequest, HttpRequestInitializer} +import com.google.api.client.json.jackson2.JacksonFactory +import com.google.api.services.storage.Storage import cromwell.cloudsupport.gcp.GoogleConfiguration import cromwell.cloudsupport.gcp.gcs.GcsStorage import cromwell.engine.io.IoActor._ @@ -48,7 +50,10 @@ class GcsBatchFlow(batchSize: Int, scheduler: Scheduler, onRetry: IoCommandConte } } - private val batch: BatchRequest = new BatchRequest(GcsStorage.HttpTransport, httpRequestInitializer) + private val batchRequest: BatchRequest = { + val storage = new Storage(GcsStorage.HttpTransport, JacksonFactory.getDefaultInstance, httpRequestInitializer) + storage.batch() + } val flow = GraphDSL.create() { implicit builder => import GraphDSL.Implicits._ @@ -114,12 +119,12 @@ class GcsBatchFlow(batchSize: Int, scheduler: Scheduler, onRetry: IoCommandConte } // Add all requests to the batch - contexts foreach { _.queue(batch) } + contexts foreach { _.queue(batchRequest) } // Try to execute the batch request. // If it fails with an IO Exception, fail all the underlying promises with a retyrable BatchFailedException // Otherwise fail with the original exception - Try(batch.execute()) match { + Try(batchRequest.execute()) match { case Failure(failure: IOException) => failAllPromisesWith(BatchFailedException(failure)) case Failure(failure) => failAllPromisesWith(failure) case _ => diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 59e5be1d0ec..f7317664482 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -28,19 +28,22 @@ object Dependencies { private val ficusV = "1.4.4" private val fs2V = "2.0.0" private val fs2VStatsDProxy = "1.0.3" - private val googleApiClientV = "1.28.0" - private val googleCloudCoreV = "1.61.0" + private val googleApiClientV = "1.30.9" + private val googleCloudBigQueryV = "1.116.3" private val googleCloudKmsV = "v1-rev63-1.25.0" - private val googleCloudMonitoringV = "1.70.0" + private val googleCloudMonitoringV = "1.100.1" private val googleCloudNioV = "0.61.0-alpha" + private val googleCloudStorageV = "1.111.1" + private val googleGaxGrpcV = "1.57.0" private val googleGenomicsServicesV1ApiV = "v1alpha2-rev495-1.23.0" private val googleGenomicsServicesV2Alpha1ApiV = "v2alpha1-rev31-1.25.0" + private val googleHttpClientApacheV = "2.1.2" + private val googleHttpClientV = "1.36.0" private val googleLifeSciencesServicesV2BetaApiV = "v2beta-rev5-1.25.0" - private val googleHttpClientApacheV = "2.1.1" - private val googleHttpClientV = "1.29.1" - private val googleOauth2V = "0.13.0" + private val googleOauth2V = "0.21.0" + private val googleOauthClientV = "1.31.0" private val googleCloudResourceManagerV = "0.87.0-alpha" - private val grpcV = "1.20.0" + private val grpcV = "1.28.1" private val guavaV = "27.0.1-jre" private val heterodonV = "1.0.0-beta3" private val hsqldbV = "2.4.1" @@ -171,8 +174,8 @@ object Dependencies { val implDrsDependencies = List( "org.apache.commons" % "commons-lang3" % commonsLang3V, - "com.google.cloud" % "google-cloud-storage" % googleCloudCoreV, - "com.google.oauth-client" % "google-oauth-client" % googleApiClientV + "com.google.cloud" % "google-cloud-storage" % googleCloudStorageV, + "com.google.oauth-client" % "google-oauth-client" % googleOauthClientV ) ++ circeDependencies ++ catsDependencies // Internal collections of dependencies @@ -487,7 +490,7 @@ object Dependencies { val centaurDependencies = List( "org.apache.commons" % "commons-math3" % commonsMathV, "com.github.kxbmap" %% "configs" % configsV, - "com.google.cloud" % "google-cloud-bigquery" % googleCloudCoreV % IntegrationTest, + "com.google.cloud" % "google-cloud-bigquery" % googleCloudBigQueryV % IntegrationTest, "org.gnieh" %% "diffson-spray-json" % "4.0.1" ) ++ circeDependencies ++ slf4jBindingDependencies ++ cloudSupportDependencies ++ http4sDependencies @@ -506,6 +509,10 @@ object Dependencies { "net.thisptr" % "jackson-jq" % jacksonJqV % Test ) + val servicesDependencies = List( + "com.google.api" % "gax-grpc" % googleGaxGrpcV % Test + ) + val serverDependencies = slf4jBindingDependencies val cromiamDependencies = List( @@ -551,7 +558,7 @@ object Dependencies { val drsLocalizerDependencies = List( "com.google.auth" % "google-auth-library-oauth2-http" % googleOauth2V, - "com.google.cloud" % "google-cloud-storage" % googleCloudCoreV, + "com.google.cloud" % "google-cloud-storage" % googleCloudStorageV, "org.typelevel" %% "cats-effect" % catsEffectV, "com.iheart" %% "ficus" % ficusV, "com.softwaremill.sttp" %% "circe" % sttpV diff --git a/project/plugins.sbt b/project/plugins.sbt index ee15953c8e8..1e607a1a33c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,3 +6,4 @@ addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.8") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1") addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.10.1") addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.1.0-M1") +addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1")