Skip to content

Commit

Permalink
Revert "Move bulk describe logging here and make it consistent (after…
Browse files Browse the repository at this point in the history
… ids --> set, so the numbers should match)"

This reverts commit e68a639.
  • Loading branch information
r-i-v-a committed Mar 21, 2024
1 parent 4d8e9c9 commit b9b2a06
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions api/src/main/scala/dx/api/DxApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -980,12 +980,9 @@ case class DxApi(version: String = "1.0.0", dxEnv: DXEnvironment = DxApi.default
(Vector.empty, files)
}

val uniqueFileIds = files.map(_.id).toSet
logger.trace(s"Bulk describing ${uniqueFileIds} unique file ids")

val allResults = workspaceResults ++ remaining.groupBy(_.project).flatMap {
case (None, files) if currentProjectId.isDefined =>
submitRequest(uniqueFileIds, currentProject)
submitRequest(files.map(_.id).toSet, currentProject)
case (None, files) =>
throw new Exception(
s"""
Expand All @@ -994,9 +991,9 @@ case class DxApi(version: String = "1.0.0", dxEnv: DXEnvironment = DxApi.default
|""".stripMargin
)
case (proj, files) if proj.get.id.startsWith("container") && proj != currentWorkspace =>
submitRequest(uniqueFileIds, currentProject)
submitRequest(files.map(_.id).toSet, currentProject)
case (proj, files) =>
submitRequest(uniqueFileIds, proj)
submitRequest(files.map(_.id).toSet, proj)
}

if (validate) {
Expand All @@ -1018,7 +1015,6 @@ case class DxApi(version: String = "1.0.0", dxEnv: DXEnvironment = DxApi.default
}
}

logger.trace(s"Successfully bulk described ${allResults.size} files")
allResults
}

Expand Down

0 comments on commit b9b2a06

Please sign in to comment.