Skip to content

Commit

Permalink
Fixes #24515: Rudder should finish to migrate all techniques when boo…
Browse files Browse the repository at this point in the history
…ting instead of stopping on first error
  • Loading branch information
VinceMacBuche committed Mar 15, 2024
1 parent 228c36a commit b795aee
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -54,6 +54,7 @@ import com.normation.rudder.rest.RestExtractorService
import com.normation.utils.StringUuidGenerator
import com.normation.zio._
import zio._
import zio.syntax._

sealed trait NcfTechniqueUpgradeError extends RudderError {
def msg: String
Expand Down Expand Up @@ -112,6 +113,11 @@ class CheckNcfTechniqueUpdate(
techniqueWrite
.writeTechnique(t, methods, ModificationId(uuidGen.newUuid), EventActor(systemApiToken.name.value))
.chainError(s"An error occured while writing technique ${t.bundleName.value}")
.either
}
_ <- ZIO.foreach(written) {
case Right(_) => ().succeed
case Left(err) => BootstrapLogger.error(err.fullMsg)
}
// Update technique library once all technique are updated
libUpdate <- techLibUpdate
Expand Down

0 comments on commit b795aee

Please sign in to comment.