Skip to content

Commit

Permalink
fix(analysis): Avoid Infinite Error Message Append For Failed Dry-Run…
Browse files Browse the repository at this point in the history
… Metrics (argoproj#2182)

Signed-off-by: Rohit Agrawal <[email protected]>

Signed-off-by: Rohit Agrawal <[email protected]>
  • Loading branch information
agrawroh authored and jandersen-plaid committed Nov 26, 2022
1 parent da56d87 commit e744f62
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions analysis/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,7 @@ func (c *Controller) assessRunStatus(run *v1alpha1.AnalysisRun, metrics []v1alph
}
// 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
Expand Down

0 comments on commit e744f62

Please sign in to comment.