diff --git a/analysis/analysis.go b/analysis/analysis.go index 1ebee1ec2c..53d5358647 100644 --- a/analysis/analysis.go +++ b/analysis/analysis.go @@ -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,