Просмотр исходного кода

Update aggregation with error passing early on an ErrorCollection (avoid calling err.Error())

Matt Bolt 5 лет назад
Родитель
Сommit
e723dcb332
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      pkg/costmodel/aggregation.go

+ 3 - 0
pkg/costmodel/aggregation.go

@@ -1301,6 +1301,9 @@ func (a *Accesses) ComputeAggregateCostModel(promClient prometheusClient.Client,
 
 		costData, err = a.Model.ComputeCostDataRange(promClient, a.KubeClientSet, a.CloudProvider, start, end, window, resolutionHours, "", "", remoteEnabled, offset)
 		if err != nil {
+			if prom.IsErrorCollection(err) {
+				return nil, "", err
+			}
 			if pce, ok := err.(prom.CommError); ok {
 				return nil, "", pce
 			}