Skip to content

Commit

Permalink
fix #2024 (#2155)
Browse files Browse the repository at this point in the history
Signed-off-by: zachaller <[email protected]>
  • Loading branch information
zachaller authored Jul 25, 2022
1 parent 51c874c commit 22aff27
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions analysis/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ func (c *Controller) runMeasurements(run *v1alpha1.AnalysisRun, tasks []metricTa
resultsLock.Unlock()

provider, err := c.newProvider(*logger, t.metric)
//Fix for https://github.com/argoproj/argo-rollouts/issues/2024 this error is not bubbled to runMeasurements function
//it just stops the go routine to prevent nil pointer usage. Just keeping this simple due to it being a patch for a bug.
//We probably want to handle errors in this goroutine in a different way in master but for now just prevent crashing.
if err != nil {
log.Errorf("Error in getting provider :%v", err)
return
}
if metricResult == nil {
metricResult = &v1alpha1.MetricResult{
Name: t.metric.Name,
Expand Down

0 comments on commit 22aff27

Please sign in to comment.