From 09851e4734603093825c906817d88140ab7661e4 Mon Sep 17 00:00:00 2001 From: Broad Bot <61600560+broadbot@users.noreply.github.com> Date: Mon, 14 Aug 2023 08:40:04 -0400 Subject: [PATCH 1/4] Update logback-classic from 1.4.9 to 1.4.11 (#1193) --- automation/project/Dependencies.scala | 2 +- project/Dependencies.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/project/Dependencies.scala b/automation/project/Dependencies.scala index 4d57fd58a..616192e1d 100644 --- a/automation/project/Dependencies.scala +++ b/automation/project/Dependencies.scala @@ -34,7 +34,7 @@ object Dependencies { val rootDependencies: Seq[ModuleID] = Seq( "com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonV, "net.virtual-void" %% "json-lenses" % "0.6.2" % "test", - "ch.qos.logback" % "logback-classic" % "1.4.9", + "ch.qos.logback" % "logback-classic" % "1.4.11", "com.typesafe.akka" %% "akka-http-core" % akkaHttpV, "com.typesafe.akka" %% "akka-stream-testkit" % akkaV, "com.typesafe.akka" %% "akka-http" % akkaHttpV, diff --git a/project/Dependencies.scala b/project/Dependencies.scala index d08d56e00..33b7abe99 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -39,7 +39,7 @@ object Dependencies { // elasticsearch requires log4j, but we redirect log4j to logback "org.apache.logging.log4j" % "log4j-to-slf4j" % "2.20.0", - "ch.qos.logback" % "logback-classic" % "1.4.9", + "ch.qos.logback" % "logback-classic" % "1.4.11", "com.getsentry.raven" % "raven-logback" % "8.0.3", // TODO: this should be io.sentry / sentry-logback instead "com.typesafe.scala-logging" %% "scala-logging" % "3.9.5", From 1008189f47952af4fa7e2d19c27cbe3ec6b8567d Mon Sep 17 00:00:00 2001 From: Broad Bot <61600560+broadbot@users.noreply.github.com> Date: Mon, 14 Aug 2023 10:02:54 -0400 Subject: [PATCH 2/4] Update google-api-services-admin-directory from directory_v1-rev20230516-2.0.0 to directory_v1-rev20230802-2.0.0 (#1194) Co-authored-by: Bria Morgan --- project/Dependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 33b7abe99..e8ede0343 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -80,7 +80,7 @@ object Dependencies { excludeGuava("com.google.apis" % "google-api-services-pubsub" % "v1-rev20230529-2.0.0"), - excludeGuava("com.google.apis" % "google-api-services-admin-directory" % "directory_v1-rev20230516-2.0.0"), + excludeGuava("com.google.apis" % "google-api-services-admin-directory" % "directory_v1-rev20230802-2.0.0"), "com.github.jwt-scala" %% "jwt-core" % "9.4.3", From 3a84ce3d3b081ad4889f36e073220377f9f9dd14 Mon Sep 17 00:00:00 2001 From: Bria Morgan Date: Mon, 14 Aug 2023 13:54:09 -0400 Subject: [PATCH 3/4] AJ-1128 check for json in tsv attribute upload (#1197) * jsobject only --- .../dsde/firecloud/service/TSVFileSupport.scala | 10 ++++++++-- .../broadinstitute/dsde/firecloud/mock/MockTSV.scala | 3 +-- .../dsde/firecloud/service/TSVFileSupportSpec.scala | 4 +++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/scala/org/broadinstitute/dsde/firecloud/service/TSVFileSupport.scala b/src/main/scala/org/broadinstitute/dsde/firecloud/service/TSVFileSupport.scala index 3ea881d88..09cbc2c01 100644 --- a/src/main/scala/org/broadinstitute/dsde/firecloud/service/TSVFileSupport.scala +++ b/src/main/scala/org/broadinstitute/dsde/firecloud/service/TSVFileSupport.scala @@ -126,7 +126,7 @@ trait TSVFileSupport { if (value.equals("__DELETE__")) RemoveAttribute(AttributeName.fromDelimitedName(name)) else { - AddUpdateAttribute(AttributeName.fromDelimitedName(name), AttributeString(StringContext.processEscapes(value))) + AddUpdateAttribute(AttributeName.fromDelimitedName(name), checkForJson(StringContext.processEscapes(value))) } } } @@ -165,12 +165,18 @@ trait TSVFileSupport { case Success(ref) => ref case Failure(_) => AttributeString(value) } - } } } } + def checkForJson(value: String): Attribute = { + Try(value.parseJson) match { + case Success(_: JsObject) => AttributeValueRawJson(value) + case _ => AttributeString(value) + } + } + def matchesLiteral(value: String): Boolean = { value.toLowerCase().endsWith("d") || value.toLowerCase().endsWith("f") } diff --git a/src/test/scala/org/broadinstitute/dsde/firecloud/mock/MockTSV.scala b/src/test/scala/org/broadinstitute/dsde/firecloud/mock/MockTSV.scala index 33f0908a4..7a213e01a 100644 --- a/src/test/scala/org/broadinstitute/dsde/firecloud/mock/MockTSV.scala +++ b/src/test/scala/org/broadinstitute/dsde/firecloud/mock/MockTSV.scala @@ -3,7 +3,6 @@ package org.broadinstitute.dsde.firecloud.mock import akka.http.scaladsl.model.Multipart import akka.http.scaladsl.model.Multipart.FormData.BodyPart import org.broadinstitute.dsde.firecloud.utils.TSVLoadFile - object MockTSVStrings { /* @@ -309,7 +308,7 @@ object MockTSVLoadFiles { Seq("foo", "bar", "baz"), Seq(Seq("woop", "", "doo"))) - val validWorkspaceAttributes = TSVLoadFile("workspace", Seq("a1", "a2", "a3"), Seq(Seq("v1", "2", "[1,2,3]"))) + val validWorkspaceAttributes = TSVLoadFile("workspace", Seq("a1", "a2", "a3", "a4"), Seq(Seq("v1", "2", "[1,2,3]","""{"tables":{"sample":{"save":["participant",false,"sample",true]}}}"""))) val validOneWorkspaceAttribute = TSVLoadFile("workspace", Seq("a1"), Seq(Seq("v1"))) val validEmptyStrWSAttribute = TSVLoadFile("workspace", Seq("a1"), Seq(Seq(""))) val validRemoveWSAttribute = TSVLoadFile("workspace", Seq("a1"), Seq(Seq("__DELETE__"))) diff --git a/src/test/scala/org/broadinstitute/dsde/firecloud/service/TSVFileSupportSpec.scala b/src/test/scala/org/broadinstitute/dsde/firecloud/service/TSVFileSupportSpec.scala index 880776f89..b7d5bde10 100644 --- a/src/test/scala/org/broadinstitute/dsde/firecloud/service/TSVFileSupportSpec.scala +++ b/src/test/scala/org/broadinstitute/dsde/firecloud/service/TSVFileSupportSpec.scala @@ -24,7 +24,9 @@ class TSVFileSupportSpec extends AnyFreeSpec with TSVFileSupport { assertResult(attributes) { List(AddUpdateAttribute(AttributeName("default", "a1"), AttributeString("v1")), AddUpdateAttribute(AttributeName("default", "a2"), AttributeString("2")), - AddUpdateAttribute(AttributeName("default", "a3"), AttributeString("[1,2,3]"))) + AddUpdateAttribute(AttributeName("default", "a3"), AttributeString("[1,2,3]")), + AddUpdateAttribute(AttributeName("default", "a4"), AttributeValueRawJson("""{"tables":{"sample":{"save":["participant",false,"sample",true]}}}""") + )) } } From 85d2bcf1cd9d1fb44316e64caa6bfe9888a2342b Mon Sep 17 00:00:00 2001 From: Broad Bot <61600560+broadbot@users.noreply.github.com> Date: Tue, 15 Aug 2023 08:43:08 -0400 Subject: [PATCH 4/4] AJ-1185 Update google-api-services-pubsub from v1-rev20230529-2.0.0 to v1-rev20230801-2.0.0 (#1195) * Update google-api-services-pubsub from v1-rev20230529-2.0.0 to v1-rev20230801-2.0.0 * Revert commit(s) a9a5b9e5 * Update google-api-services-pubsub from v1-rev20230529-2.0.0 to v1-rev20230801-2.0.0 --- project/Dependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index e8ede0343..bad5dc0cb 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -79,7 +79,7 @@ object Dependencies { exclude("org.apache.logging.log4j", "log4j-core"), - excludeGuava("com.google.apis" % "google-api-services-pubsub" % "v1-rev20230529-2.0.0"), + excludeGuava("com.google.apis" % "google-api-services-pubsub" % "v1-rev20230801-2.0.0"), excludeGuava("com.google.apis" % "google-api-services-admin-directory" % "directory_v1-rev20230802-2.0.0"),