kubecost / kubectl-cost

CLI for determining the cost of Kubernetes workloads
Apache License 2.0
872 stars 55 forks source link

Fix TUI allocation query always reporting empty #129

Closed michaelmdresser closed 2 years ago

michaelmdresser commented 2 years ago

What does this PR change?

Fixes the TUI always/almost always failing on startup with ERR Allocation response was empty. Not updating the table.

We were checking the wrong length, resulting in the TUI always failing because the "allocations" is always initialized as empty. Updates the naming of the query response variable for additional clarity in the future.

How does this PR impact users? (This is the kind of thing that goes in release notes!)

Fixes the TUI always/almost always failing on startup with ERR Allocation response was empty. Not updating the table.

How was this PR tested?

Against a 1.96.0 Kubecost running in GKE. Observed failure before change and success after change.