From 22aff273bf95646e0cd02555fbe7d2da0f903316 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Mon, 25 Jul 2022 14:32:55 -0500 Subject: [PATCH] fix https://github.com/argoproj/argo-rollouts/issues/2024 (#2155) Signed-off-by: zachaller --- analysis/analysis.go | 7 +++++++ 1 file changed, 7 insertions(+) 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,