Skip to content

Commit

Permalink
Decrement revision on update for tagged resolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Dumas committed Nov 19, 2024
1 parent 80b78da commit 6740113
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ class ResolverProcessor private (
case ResolverUpdated(_, _, value, _, _, _, _) =>
implicit val caller: Caller = Caller(s, identities(value))
val patched = patchValue(value, projectMapper, iriPatcher)
resolvers.update(id, projectRef, cRev, patched)
resolvers.update(id, projectRef, cRev, patched).recoverWith { case IncorrectRev(_, expectedRev) =>
resolvers.update(id, projectRef, expectedRev, patched)
}
case _: ResolverTagAdded =>
// Tags have been removed
IO.unit
case _: ResolverDeprecated =>
resolvers.deprecate(id, projectRef, cRev)
resolvers.deprecate(id, projectRef, cRev).recoverWith { case IncorrectRev(_, expectedRev) =>
resolvers.deprecate(id, projectRef, expectedRev)
}
}
}.redeemWith(
{
Expand Down

0 comments on commit 6740113

Please sign in to comment.