Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Patch dependency updates #3261

Merged
merged 7 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object Dependencies {
val zioNio = "dev.zio" %% "zio-nio" % ZioNioVersion
val zioMacros = "dev.zio" %% "zio-macros" % ZioVersion
val zioPrelude = "dev.zio" %% "zio-prelude" % ZioPreludeVersion
val zioSttp = "com.softwaremill.sttp.client3" %% "zio" % "3.9.6"
val zioSttp = "com.softwaremill.sttp.client3" %% "zio" % "3.9.7"

// refined
val refined = Seq(
Expand Down Expand Up @@ -112,7 +112,7 @@ object Dependencies {
// found/added by the plugin but deleted anyway
val commonsLang3 = "org.apache.commons" % "commons-lang3" % "3.14.0"

val tapirVersion = "1.10.7"
val tapirVersion = "1.10.8"

val tapir = Seq(
"com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % tapirVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ import org.knora.webapi.config.KnoraApi
import org.knora.webapi.core.State
import org.knora.webapi.slice.admin.api.AdminApiEndpoints
import org.knora.webapi.slice.common.api.ApiV2Endpoints
import org.knora.webapi.slice.infrastructure.api.PrometheusApp
import org.knora.webapi.slice.infrastructure.api.PrometheusRoutes

object MetricsServer {

private val metricsServer
: ZIO[AdminApiEndpoints & ApiV2Endpoints & KnoraApi & PrometheusApp & Server, Nothing, Unit] = for {
: ZIO[AdminApiEndpoints & ApiV2Endpoints & KnoraApi & PrometheusRoutes & Server, Nothing, Unit] = for {
docs <- DocsServer.docsEndpoints.map(endpoints => ZioHttpInterpreter().toHttp(endpoints))
prometheus <- ZIO.service[PrometheusApp]
_ <- Server.install(prometheus.route ++ docs)
prometheus <- ZIO.service[PrometheusRoutes]
_ <- Server.install(prometheus.routes ++ docs)
_ <- ZIO.never.as(())
} yield ()

Expand Down Expand Up @@ -58,7 +58,7 @@ object MetricsServer {
Runtime.enableRuntimeMetrics,
Runtime.enableFiberRoots,
DefaultJvmMetrics.live.unit,
PrometheusApp.layer,
PrometheusRoutes.layer,
)
} yield ()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
/**
* Provides the '/metrics' endpoint serving the metrics in prometheus format.
*/
final case class PrometheusApp(prometheus: PrometheusPublisher) {
val route: HttpApp[Any] = Routes(Method.GET / "metrics" -> handler(prometheus.get.map(Response.text(_)))).toHttpApp
final case class PrometheusRoutes(prometheus: PrometheusPublisher) {
val routes: Routes[Any, Nothing] = Routes(Method.GET / "metrics" -> handler(prometheus.get.map(Response.text)))

Check warning on line 16 in webapi/src/main/scala/org/knora/webapi/slice/infrastructure/api/PrometheusRoutes.scala

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

webapi/src/main/scala/org/knora/webapi/slice/infrastructure/api/PrometheusRoutes.scala#L16

Usage of get on optional type.
}
object PrometheusApp {
val layer = ZLayer.derive[PrometheusApp]
object PrometheusRoutes {
val layer = ZLayer.derive[PrometheusRoutes]
}
Loading