From 3750e47ebeb6d3b06ffaac6815341709caa44832 Mon Sep 17 00:00:00 2001 From: Rohit Agrawal Date: Mon, 1 Aug 2022 16:13:01 -0700 Subject: [PATCH] fix(analysis): Avoid Infinite Error Message Append For Failed Dry-Run Metrics Signed-off-by: Rohit Agrawal --- analysis/analysis.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/analysis/analysis.go b/analysis/analysis.go index 5bae4a8892..3bb7d89731 100644 --- a/analysis/analysis.go +++ b/analysis/analysis.go @@ -510,12 +510,7 @@ func (c *Controller) assessRunStatus(run *v1alpha1.AnalysisRun, metrics []v1alph } else { // Update metric result message if message != "" { - failureMessage := fmt.Sprintf("Metric assessed %s due to %s", metricStatus, message) - if result.Message != "" { - result.Message = fmt.Sprintf("%s: \"Error Message: %s\"", failureMessage, result.Message) - } else { - result.Message = failureMessage - } + result.Message = fmt.Sprintf("Metric assessed %s due to %s", metricStatus, message) analysisutil.SetResult(run, *result) } // Update DryRun Summary