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 8, 2022
1 parent dcf70df commit 1ed8e34
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 1ed8e34

Please sign in to comment.