Преглед на файлове

Merge pull request #2385 from r2k1/fix-unable-to-locate

Log and continue on a single record processing failures.
Cliff Colvin преди 2 години
родител
ревизия
40ab230587
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 2 3
      pkg/costmodel/costmodel.go

+ 2 - 3
pkg/costmodel/costmodel.go

@@ -2554,9 +2554,8 @@ func (cm *CostModel) QueryAllocation(window kubecost.Window, resolution, step ti
 					}
 					}
 
 
 					if totals == nil {
 					if totals == nil {
-						log.Errorf("unable to locate asset totals for allocation %s", key)
-						return nil, fmt.Errorf("unable to locate allocation totals for allocation")
-
+						log.Errorf("unable to locate asset totals for allocation %s, corresponding PARC is being skipped", key)
+						continue
 					}
 					}
 
 
 					parc.CPUTotalCost = totals.CPUCost
 					parc.CPUTotalCost = totals.CPUCost