Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import sbt._

object Dependencies {
val circeVersion = "0.14.3"
val http4sVersion = "1.0.0-M35"
val http4sVersion = "1.0.0-M38"
val grpcCoreVersion = "1.51.0"
val scalaTestVersion = "3.2.14"

val workbenchLibsHash = "1a6839f"
val workbenchGoogle2V = s"0.25-$workbenchLibsHash"
val workbenchAzureV = s"0.1-$workbenchLibsHash"
val workbenchLibsHash = "2eac218"
val workbenchGoogle2V = s"0.34-$workbenchLibsHash"
val workbenchAzureV = s"0.6-$workbenchLibsHash"

val common = List(
"com.github.pureconfig" %% "pureconfig" % "0.17.2",
Expand Down
2 changes: 1 addition & 1 deletion project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.typesafe.sbt.packager.linux.LinuxPlugin.autoImport._
import sbtbuildinfo.BuildInfoPlugin.autoImport._

object Settings {
lazy val artifactory = "https://artifactory.broadinstitute.org/artifactory/"
lazy val artifactory = "https://broadinstitute.jfrog.io/broadinstitute/"

lazy val commonResolvers = List(
"artifactory-releases" at artifactory + "libs-release",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,28 @@ class BackgroundTask(
}

val delocalizeBackgroundProcess: Stream[IO, Unit] = {
println(s"Background sync enabled: ${config.shouldBackgroundSync}")
if (config.shouldBackgroundSync) {
val res = (for {
storageLinks <- storageLinksCache.get
_ <- logger.info(s"Background sync enabled: ${config.shouldBackgroundSync}")
implicit0(tid: Ask[IO, TraceId]) <- IO(TraceId(UUID.randomUUID().toString)).map(tid => Ask.const[IO, TraceId](tid))
_ <- storageLinks.values.toList.traverse { storageLink =>
findFilesWithPattern(config.workingDirectory.resolve(storageLink.localBaseDirectory.path.asPath), storageLink.pattern).traverse_ { file =>
val gsPath = getCloudBlobPath(storageLink, new File(file.getName))
checkSyncStatus(
gsPath,
RelativePath(java.nio.file.Paths.get(file.getName))
)
// Because of the locking mechanism in place for notebooks, we want to exclude ipynb files from the background delocalization process
val patternToExclude = ".*.ipynb$".r
println(s"storageLink: ${storageLink}")
println(s"gspath: ${gsPath}")
println(s"file: ${file}")
println(s"filename: ${file.getName}")
println(s"relative path: ${RelativePath(java.nio.file.Paths.get(file.getPath))}")
if (!patternToExclude.findFirstIn(file.getName).isDefined) {
checkSyncStatus(
gsPath,
RelativePath(java.nio.file.Paths.get(file.getPath))
)
} else logger.info("Not syncing .ipynb file") // TODO remove just for debugging
}
}
} yield ()).handleErrorWith(r => logger.info(r)(s"Unexpected error encountered ${r}"))
Expand Down