Skip to content

Commit

Permalink
Stop downloading, compiling, and uploading dead jes code [BT-84] (#6311)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshakir authored Jun 11, 2021
1 parent 7f9cfcb commit 1e6d7e2
Show file tree
Hide file tree
Showing 21 changed files with 6 additions and 1,017 deletions.
17 changes: 0 additions & 17 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,6 @@ lazy val googlePipelinesCommon = (project in backendRoot / "google" / "pipelines
.dependsOn(services % "test->test")
.dependsOn(common % "test->test")

lazy val googlePipelinesV1Alpha2 = (project in backendRoot / "google" / "pipelines" / "v1alpha2")
.withLibrarySettings("cromwell-pipelines-v1-backend")
.dependsOn(googlePipelinesCommon)
.dependsOn(googlePipelinesCommon % "test->test")
.dependsOn(core % "test->test")
.dependsOn(common % "test->test")

lazy val googlePipelinesV2Alpha1 = (project in backendRoot / "google" / "pipelines" / "v2alpha1")
.withLibrarySettings("cromwell-pipelines-v2-alpha1-backend")
.dependsOn(googlePipelinesCommon)
Expand All @@ -229,12 +222,6 @@ lazy val googlePipelinesV2Beta = (project in backendRoot / "google" / "pipelines
.dependsOn(core % "test->test")
.dependsOn(common % "test->test")

// Legacy, inherits all its code from googlePipelinesV1Alpha2
lazy val jesBackend = (project in backendRoot / "jes")
.withLibrarySettings("cromwell-jes-backend")
.dependsOn(googlePipelinesV1Alpha2)
.dependsOn(common % "test->test")

lazy val awsBackend = (project in backendRoot / "aws")
.withLibrarySettings("cromwell-aws-backend")
.dependsOn(backend)
Expand Down Expand Up @@ -404,10 +391,8 @@ lazy val `cromwell-drs-localizer` = project
lazy val server = project
.withExecutableSettings("cromwell", serverDependencies)
.dependsOn(engine)
.dependsOn(googlePipelinesV1Alpha2)
.dependsOn(googlePipelinesV2Alpha1)
.dependsOn(googlePipelinesV2Beta)
.dependsOn(jesBackend)
.dependsOn(bcsBackend)
.dependsOn(awsBackend)
.dependsOn(tesBackend)
Expand Down Expand Up @@ -448,11 +433,9 @@ lazy val root = (project in file("."))
.aggregate(ftpFileSystem)
.aggregate(gcsFileSystem)
.aggregate(googlePipelinesCommon)
.aggregate(googlePipelinesV1Alpha2)
.aggregate(googlePipelinesV2Alpha1)
.aggregate(googlePipelinesV2Beta)
.aggregate(httpFileSystem)
.aggregate(jesBackend)
.aggregate(languageFactoryCore)
.aggregate(ossFileSystem)
.aggregate(perf)
Expand Down
4 changes: 2 additions & 2 deletions centaur/src/main/scala/centaur/test/Test.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import centaur.test.metadata.WorkflowFlatMetadata
import centaur.test.metadata.WorkflowFlatMetadata._
import centaur.test.submit.SubmitHttpResponse
import centaur.test.workflow.Workflow
import com.google.api.services.genomics.{Genomics, GenomicsScopes}
import com.google.api.services.genomics.v2alpha1.{Genomics, GenomicsScopes}
import com.google.api.services.storage.StorageScopes
import com.google.auth.Credentials
import com.google.auth.http.HttpCredentialsAdapter
Expand Down Expand Up @@ -384,7 +384,7 @@ object Operations extends StrictLogging {
new Test[Unit] {
def checkPAPIAborted(): IO[Unit] = {
for {
operation <- IO { genomics.operations().get(jobId).execute() }
operation <- IO { genomics.projects().operations().get(jobId).execute() }
done = operation.getDone
operationError = Option(operation.getError)
aborted = operationError.exists(_.getCode == 1) && operationError.exists(_.getMessage.startsWith("Operation canceled"))
Expand Down
9 changes: 1 addition & 8 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ object Dependencies {
private val googleCloudNioV = "0.61.0-alpha" // scala-steward:off
private val googleCloudStorageV = "1.113.14"
private val googleGaxGrpcV = "1.62.0"
private val googleGenomicsServicesV1ApiV = "v1alpha2-rev495-1.23.0"
private val googleGenomicsServicesV2Alpha1ApiV = "v2alpha1-rev20210322-1.31.0"
private val googleHttpClientApacheV = "2.1.2"
private val googleHttpClientV = "1.38.0"
Expand Down Expand Up @@ -281,12 +280,6 @@ object Dependencies {
"org.yaml" % "snakeyaml" % snakeyamlV % Test
)

// The v1 dependency has been cloned in the broad artifactory so that we can have the 2 versions co-exist in the same jar
private val googleGenomicsV1Dependency = List(
"org.broadinstitute" % "cromwell-google-api-services-genomics" % googleGenomicsServicesV1ApiV
exclude("com.google.guava", "guava-jdk5")
)

private val googleGenomicsV2Alpha1Dependency = List(
"com.google.apis" % "google-api-services-genomics" % googleGenomicsServicesV2Alpha1ApiV
exclude("com.google.guava", "guava-jdk5")
Expand Down Expand Up @@ -333,7 +326,7 @@ object Dependencies {
"org.apache.httpcomponents" % "httpclient" % apacheHttpClientV,
"com.google.apis" % "google-api-services-cloudkms" % googleCloudKmsV
exclude("com.google.guava", "guava-jdk5")
) ++ googleGenomicsV1Dependency ++ googleGenomicsV2Alpha1Dependency ++ googleLifeSciencesV2BetaDependency
) ++ googleGenomicsV2Alpha1Dependency ++ googleLifeSciencesV2BetaDependency

private val aliyunOssDependencies = List(
"com.aliyun.oss" % "aliyun-sdk-oss" % aliyunOssV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ abstract class WorkbenchHealthMonitorServiceActor(val serviceConfig: Config, glo
genomicsChecker = if (actorFactoryName.contains("v2beta")) {
val location = papiConfig.as[String]("genomics.location")
GenomicsCheckerV2Beta(googleConfig.applicationName, googleAuth, endpointUrl, location, credentials, papiProjectId)
} else if (actorFactoryName.contains("v2alpha1")) {
GenomicsCheckerV2Alpha1(googleConfig.applicationName, googleAuth, endpointUrl, credentials, papiProjectId)
} else {
GenomicsCheckerV1(googleConfig.applicationName, googleAuth, endpointUrl, credentials, papiProjectId)
GenomicsCheckerV2Alpha1(googleConfig.applicationName, googleAuth, endpointUrl, credentials, papiProjectId)
}
checked <- genomicsChecker.check
} yield checked
Expand All @@ -109,25 +107,6 @@ object WorkbenchHealthMonitorServiceActor {
def check: Future[Unit]
}

case class GenomicsCheckerV1(applicationName: String,
authMode: GoogleAuthMode,
endpointUrl: URL,
credentials: Credentials,
papiProjectId: String)(implicit val ec: ExecutionContext) extends GenomicsChecker {
val genomics = new com.google.api.services.genomics.Genomics.Builder(
GoogleAuthMode.httpTransport,
GoogleAuthMode.jsonFactory,
httpInitializer(credentials))
.setApplicationName(applicationName)
.setRootUrl(endpointUrl.toString)
.build

override def check = Future {
genomics.pipelines().list().setProjectId(papiProjectId).setPageSize(1).execute()
()
}
}

case class GenomicsCheckerV2Beta(applicationName: String,
authMode: GoogleAuthMode,
endpointUrl: URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.google.api.client.http.{HttpRequest, HttpResponse}
import com.google.api.services.cloudkms.v1.model.EncryptRequest
import com.google.api.services.cloudkms.v1.{CloudKMS, CloudKMSScopes}
import com.google.api.services.cloudresourcemanager.CloudResourceManager
import com.google.api.services.genomics.GenomicsScopes
import com.google.api.services.genomics.v2alpha1.GenomicsScopes
import com.google.api.services.lifesciences.v2beta.CloudLifeSciencesScopes
import com.google.api.services.storage.StorageScopes
import com.google.auth.Credentials
Expand Down Expand Up @@ -65,10 +65,6 @@ class PipelinesApiInitializationActor(pipelinesParams: PipelinesApiInitializatio
CloudLifeSciencesScopes.CLOUD_PLATFORM,
GenomicsScopes.GENOMICS,
/*
Genomics Pipelines API v1alpha2 requires the COMPUTE scope. Does not seem to be required for either v2alpha1 or v2beta.
*/
GenomicsScopes.COMPUTE,
/*
Used to write so-called "auth" files. The `gcsAuthFilePath` could probably be refactored such that *this* created
`genomicsCredentials` doesn't actually need DEVSTORAGE_FULL_CONTROL, but it's also not clear how the magic
Genomics Pipelines API parameter "__extra_config_gcs_path" works nor where it's documented.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1e6d7e2

Please sign in to comment.