Skip to content

Commit

Permalink
Fixes #15085: At the end of policy generation, there is a message abo…
Browse files Browse the repository at this point in the history
…ut all the nodes that didn't need to be updated that is an error message
  • Loading branch information
VinceMacBuche committed Jun 14, 2019
1 parent 7c04b54 commit 1db4dee
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,12 @@ trait PromiseGenerationService {
)
}.sortBy( _._2 ).map( _._1 )
updatedNodes = updatedNodeIds.toSet
errorNodes = activeNodeIds -- updatedNodes
_ = PolicyLogger.info(s"nodeConfigs => ${nodeConfigs.keySet.size}")
_ = PolicyLogger.info(s"activeNodes => ${activeNodeIds.size}")

errorNodes = activeNodeIds -- nodeConfigs.keySet
_ = PolicyLogger.info(s"activeNodes => ${errorNodes.size}")

_ <- RunHooks.syncRun(
postHooks
, HookEnvPairs.build(
Expand Down Expand Up @@ -468,7 +473,7 @@ trait PromiseGenerationService {
PolicyLogger.info("Run post generation hooks : %10s ms".format(timeRunPostGenHooks))
PolicyLogger.info("Number of nodes updated : %10s ".format(updatedNodeIds.size))
if(errorNodes.nonEmpty) {
PolicyLogger.warn(s"Nodes in errors (${errorNodes.size}): '${errorNodes.map(_.value).mkString("','")}'")
PolicyLogger.warn(s"Nodes in errors (${errorNodes.size}): '${if (errorNodes.size > 100) errorNodes.map(_.value).mkString("','") else "Too much to display"}'")
}
}
allErrors = configsAndErrors.errors.map(_.messageChain)
Expand Down

0 comments on commit 1db4dee

Please sign in to comment.