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 jenciso committed Oct 25, 2022
1 parent 62a4f38 commit 5ac0aec
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 @@ -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
Expand Down

0 comments on commit 5ac0aec

Please sign in to comment.