Skip to content

Commit

Permalink
Do not consider archives that are already loaded in engine (digital-a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jussi Mäki authored and mergify[bot] committed Sep 13, 2019
1 parent 68023ac commit 6ed6e0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class PureCompiledPackages private (
packages: Map[PackageId, Package],
defns: Map[SDefinitionRef, SExpr])
extends CompiledPackages {
override def packageIds = packages.keySet
override def packageIds: Set[PackageId] = packages.keySet
override def getPackage(pkgId: PackageId): Option[Package] = packages.get(pkgId)
override def getDefinition(dref: SDefinitionRef): Option[SExpr] = defns.get(dref)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ private[kvutils] case class ProcessPackageUpload(

// Filter out archives that already exists.
val filteredArchives = archives
.filterNot(
a =>
Ref.PackageId
.fromString(a.getHash)
.fold(_ => false, loadedPackages.contains))
.filter { archive =>
val stateKey = DamlStateKey.newBuilder
.setPackageId(archive.getHash)
Expand Down

0 comments on commit 6ed6e0e

Please sign in to comment.