Skip to content

Commit

Permalink
One more test
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro committed Apr 30, 2024
1 parent e2d2134 commit 0132844
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 38 deletions.
52 changes: 26 additions & 26 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -44,52 +44,52 @@ inThisBuild(
)

lazy val V = new {
val munit = "1.0.0-RC1" // "0.7.29"
val munitZio = "0.2.0"
val munit = "1.0.0-M8" // "0.7.29"
val munitZio = "0.1.1"

// https://mvnrepository.com/artifact/dev.zio/zio
val zio = "2.0.22"
val zio = "2.0.18"
val zioConfig = "4.0.1"
val zioLogging = "2.1.17"
val zioJson = "0.6.2"
val zioHttp = "3.0.0-RC6"
val zioLogging = "2.1.16"
val zioJson = "0.3.0"
val zioHttp = "3.0.0-RC4"
val zioCatsInterop = "3.3.0" // TODO "23.1.0.2" // https://mvnrepository.com/artifact/dev.zio/zio-interop-cats
val zioMetricsConnector = "2.3.1"
val zioMock = "1.0.0-RC12"
val mockito = "3.2.18.0"
val monocle = "3.2.0"
val zioMetricsConnector = "2.1.0"
val zioMock = "1.0.0-RC11"
val mockito = "3.2.16.0"
val monocle = "3.1.0"

// https://mvnrepository.com/artifact/io.circe/circe-core
val circe = "0.14.7"

val tapir = "1.6.4" // scala-steward:off // TODO "1.10.5"
val http4sBlaze = "0.23.15" // scala-steward:off // TODO "0.23.16"
val http4sBlaze = "0.23.12" // "0.23.15" // scala-steward:off // TODO "0.23.16"

val typesafeConfig = "1.4.3"
val protobuf = "3.1.9"
val testContainersScala = "0.41.3"
val testContainersScala = "0.41.0"
val testContainersJavaKeycloak = "3.2.0" // scala-steward:off

val doobie = "1.0.0-RC5"
val quill = "4.8.3"
val flyway = "9.22.3"
val postgresDriver = "42.2.29"
val logback = "1.4.14"
val slf4j = "2.0.13"
val doobie = "1.0.0-RC2"
val quill = "4.7.3"
val flyway = "9.8.3"
val postgresDriver = "42.2.27"
val logback = "1.4.8"
val slf4j = "2.0.7"

val prismSdk = "1.4.1" // scala-steward:off
val scalaUri = "4.0.3"

val jwtCirceVersion = "9.4.6"
val zioPreludeVersion = "1.0.0-RC24"
val jwtCirceVersion = "9.1.2"
val zioPreludeVersion = "1.0.0-RC16"

val apollo = "1.2.14"
val bouncyCastle = "1.78.1"
val bouncyCastle = "1.70"

val jsonSchemaValidator = "1.3.3"
val jsonSchemaValidator = "1.3.2"

val vaultDriver = "6.2.0"
val micrometer = "1.11.11"
val micrometer = "1.11.2"

val nimbusJwt = "10.0.0"
val keycloak = "23.0.7" // scala-steward:off //TODO 24.0.3 // update all quay.io/keycloak/keycloak
Expand Down Expand Up @@ -171,8 +171,8 @@ lazy val D = new {
)
// Added here to make prism-crypto works.
// Once migrated to apollo, re-evaluate if this should be removed.
val bouncyBcpkix = "org.bouncycastle" % "bcpkix-jdk18on" % V.bouncyCastle
val bouncyBcprov = "org.bouncycastle" % "bcprov-jdk18on" % V.bouncyCastle
val bouncyBcpkix = "org.bouncycastle" % "bcpkix-jdk15on" % V.bouncyCastle
val bouncyBcprov = "org.bouncycastle" % "bcpkix-jdk15on" % V.bouncyCastle

// LIST of Dependencies
val doobieDependencies: Seq[ModuleID] =
Expand Down Expand Up @@ -327,7 +327,7 @@ lazy val D_Pollux_VC_JWT = new {
val zioTestSbt = "dev.zio" %% "zio-test-sbt" % V.zio % Test
val zioTestMagnolia = "dev.zio" %% "zio-test-magnolia" % V.zio % Test

val scalaTest = "org.scalatest" %% "scalatest" % "3.2.18" % Test
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.16" % Test

// Dependency Modules
val zioDependencies: Seq[ModuleID] = Seq(zio, zioPrelude, zioTest, zioTestSbt, zioTestMagnolia)
Expand Down
16 changes: 8 additions & 8 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.11")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.9")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.6")

// In order to import proper version of com.google.protobuf.ByteString we need to add this dependency
libraryDependencies ++= Seq("com.thesamet.scalapb" %% "compilerplugin" % "0.11.15")
libraryDependencies ++= Seq("com.thesamet.scalapb" %% "compilerplugin" % "0.11.13")
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import cats.effect.std.Dispatcher
import com.zaxxer.hikari.HikariConfig
import doobie.hikari.HikariTransactor
import doobie.util.log.LogHandler
import doobie.util.ExecutionContexts
import doobie.util.transactor.Transactor
import zio.*
import zio.interop.catz.*
Expand All @@ -17,7 +18,8 @@ object TransactorLayer {
ZIO.service[DbConfig].flatMap { config =>
// Here we use `Dispatcher.apply`
// but at the agent level it is `Dispatcher.parallel` due to evicted version
Dispatcher.parallel[Task].allocated.map { case (dispatcher, _) =>
// Dispatcher.parallel[Task].allocated.map { case (dispatcher, _) =>
Dispatcher[Task].allocated.map { case (dispatcher, _) =>
given Dispatcher[Task] = dispatcher
TransactorLayer.hikari[Task](config)
}
Expand All @@ -32,7 +34,8 @@ object TransactorLayer {

// Here we use `Dispatcher.apply`
// but at the agent level it is `Dispatcher.parallel` due to evicted version
Dispatcher.parallel[ContextAwareTask].allocated.map { case (dispatcher, _) =>
// Dispatcher.parallel[ContextAwareTask].allocated.map { case (dispatcher, _) =>
Dispatcher[ContextAwareTask].allocated.map { case (dispatcher, _) =>
given Dispatcher[ContextAwareTask] = dispatcher
TransactorLayer.hikari[ContextAwareTask](config)
}
Expand All @@ -57,8 +60,9 @@ object TransactorLayer {
val pool: Resource[A, Transactor[A]] = for {
// Resource yielding a transactor configured with a bounded connect EC and an unbounded
// transaction EC. Everything will be closed and shut down cleanly after use.
// ec <- ExecutionContexts.fixedThreadPool[A](config.awaitConnectionThreads) // our connect EC
xa <- HikariTransactor.fromHikariConfig[A](hikariConfig, Some(LogHandler.jdkLogHandler))
ec <- ExecutionContexts.fixedThreadPool[A](config.awaitConnectionThreads) // our connect EC
xa <- HikariTransactor.fromHikariConfig[A](hikariConfig, ec)
// xa <- HikariTransactor.fromHikariConfig[A](hikariConfig, Some(LogHandler.jdkLogHandler))
} yield xa

pool.toManaged.toLayer[Transactor[A]]
Expand Down

0 comments on commit 0132844

Please sign in to comment.