Răsfoiți Sursa

Ignore UnmountedPVCost, and regenerate codecs

Matt Bolt 2 ani în urmă
părinte
comite
a0dd5788ca
2 a modificat fișierele cu 2 adăugiri și 6 ștergeri
  1. 2 2
      core/pkg/opencost/allocation.go
  2. 0 4
      core/pkg/opencost/opencost_codecs.go

+ 2 - 2
core/pkg/opencost/allocation.go

@@ -93,11 +93,11 @@ type Allocation struct {
 	// and appended to an Allocation, and so by default is is nil.
 	ProportionalAssetResourceCosts ProportionalAssetResourceCosts `json:"proportionalAssetResourceCosts"` //@bingen:field[ignore]
 	SharedCostBreakdown            SharedCostBreakdowns           `json:"sharedCostBreakdown"`            //@bingen:field[ignore]
-	LoadBalancers                  LbAllocations                  `json:"LoadBalancers"`                  // @bingen:field[version=18]
+	LoadBalancers                  LbAllocations                  `json:"LoadBalancers"`                  //@bingen:field[version=18]
 	// UnmountedPVCost is used to track how much of the cost in PVs is for an
 	// unmounted PV. It is not additive of PVCost() and need not be sent in API
 	// responses.
-	UnmountedPVCost float64 `json:"-"`
+	UnmountedPVCost float64 `json:"-"` //@bingen:field[ignore]
 }
 
 type LbAllocations map[string]*LbAllocation

+ 0 - 4
core/pkg/opencost/opencost_codecs.go

@@ -457,7 +457,6 @@ func (target *Allocation) MarshalBinaryWithContext(ctx *EncodingContext) (err er
 	}
 	// --- [end][write][alias](LbAllocations) ---
 
-	buff.WriteFloat64(target.UnmountedPVCost) // write float64
 	return nil
 }
 
@@ -770,9 +769,6 @@ func (target *Allocation) UnmarshalBinaryWithContext(ctx *DecodingContext) (err
 	} else {
 	}
 
-	fff := buff.ReadFloat64() // read float64
-	target.UnmountedPVCost = fff
-
 	return nil
 }