Skip to content

Commit

Permalink
Merge branch 'develop' into update/google-cloud-nio-0.127.1
Browse files Browse the repository at this point in the history
  • Loading branch information
calypsomatic authored Aug 15, 2023
2 parents 4d27564 + 85d2bcf commit 8969db6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion automation/project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down Expand Up @@ -79,8 +79,8 @@ 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-admin-directory" % "directory_v1-rev20230516-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"),


"com.github.jwt-scala" %% "jwt-core" % "9.4.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
}
}
}
Expand Down Expand Up @@ -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")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/*
Expand Down Expand Up @@ -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__")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]}}}""")
))
}
}

Expand Down

0 comments on commit 8969db6

Please sign in to comment.