Skip to content

Commit

Permalink
chore: Update scala-library from 2.13.14 to 2.13.15 (#1959)
Browse files Browse the repository at this point in the history
* chore: Update scala-library from 2.13.14 to 2.13.15

* Fix compile error due to new scala version

---------

Co-authored-by: RenkuBot <[email protected]>
Co-authored-by: Eike <[email protected]>
  • Loading branch information
3 people authored Oct 24, 2024
1 parent 0cc0105 commit bdd806d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

organization := "io.renku"
name := "renku-graph"
ThisBuild / scalaVersion := "2.13.14"
ThisBuild / scalaVersion := "2.13.15"

// This project contains nothing to package, like pure POM maven project
packagedArtifacts := Map.empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package io.renku.eventlog.init

import cats.data.Kleisli
import cats.data.Kleisli._
import cats.effect.MonadCancelThrow
import cats.syntax.all._
import io.renku.eventlog.EventLogDB.SessionResource
Expand Down Expand Up @@ -56,13 +55,13 @@ private class TimestampZoneAdderImpl[F[_]: MonadCancelThrow: Logger: SessionReso
private def migrateIfNeeded(table: String, column: String): Kleisli[F, Session[F], Unit] = {
findCurrentType(table, column) >>= {
case "timestamp with time zone" =>
liftF(Logger[F].info(s"$table.$column already migrated to 'timestamp with time zone'"))
Kleisli.liftF(Logger[F].info(s"$table.$column already migrated to 'timestamp with time zone'"))
case columnType =>
liftF[F, Session[F], Unit](Logger[F].info(s"$table.$column in '$columnType', migrating")) >>=
Kleisli.liftF[F, Session[F], Unit](Logger[F].info(s"$table.$column in '$columnType', migrating")) >>=
(_ => migrate(table, column))
}
} recoverWith { case NonFatal(e) =>
liftF(Logger[F].error(e)(s"$table.$column migration failed")) >> liftF(e.raiseError[F, Unit])
Kleisli.liftF(Logger[F].error(e)(s"$table.$column migration failed") >> e.raiseError[F, Unit])
}

private def findCurrentType(table: String, column: String): Kleisli[F, Session[F], String] = {
Expand Down

0 comments on commit bdd806d

Please sign in to comment.