Skip to content

Commit

Permalink
finalize fix
Browse files Browse the repository at this point in the history
Signed-off-by: Subhobrata Dey <[email protected]>
  • Loading branch information
sbcd90 committed Jun 29, 2024
1 parent 8a8875d commit 8384796
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class RemoteDocumentLevelMonitorRunner : MonitorRunner() {
try {
validate(monitor)
} catch (e: Exception) {
e.printStackTrace()
logger.error("Failed to start Document-level-monitor. Error: ${e.message}")
monitorResult = monitorResult.copy(error = AlertingException.wrap(e))
}
Expand Down Expand Up @@ -182,7 +181,6 @@ class RemoteDocumentLevelMonitorRunner : MonitorRunner() {
}
return monitorResult.copy(triggerResults = triggerResults, inputResults = inputRunResults)
} catch (e: Exception) {
e.printStackTrace()
logger.error("Failed running Document-level-monitor ${monitor.name}", e)
val errorMessage = ExceptionsHelper.detailedMessage(e)
monitorCtx.alertService!!.upsertMonitorErrorAlert(monitor, errorMessage, executionId, workflowRunContext)
Expand All @@ -203,6 +201,10 @@ class RemoteDocumentLevelMonitorRunner : MonitorRunner() {
if (monitor.inputs[0].name() != RemoteDocLevelMonitorInput.REMOTE_DOC_LEVEL_MONITOR_INPUT_FIELD) {
throw IOException("Invalid input with remote document-level-monitor.")
}

if ((monitor.inputs[0] as RemoteDocLevelMonitorInput).docLevelMonitorInput.indices.isEmpty()) {
throw IllegalArgumentException("DocLevelMonitorInput has no indices")
}
}

private fun getNodes(monitorCtx: MonitorRunnerExecutionContext): Map<String, DiscoveryNode> {
Expand Down

0 comments on commit 8384796

Please sign in to comment.