-
Notifications
You must be signed in to change notification settings - Fork 1
humanizeBytes renders Ki-range sizes as raw bytes #31
Copy link
Copy link
Open
Labels
area/consoleIssues or PRs related to apps/console — routes, detail pages, marketplace, command paletteIssues or PRs related to apps/console — routes, detail pages, marketplace, command palettekind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/backlogGeneral backlog priority. Lower than priority/important-longtermGeneral backlog priority. Lower than priority/important-longterm
Metadata
Metadata
Assignees
Labels
area/consoleIssues or PRs related to apps/console — routes, detail pages, marketplace, command paletteIssues or PRs related to apps/console — routes, detail pages, marketplace, command palettekind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/backlogGeneral backlog priority. Lower than priority/important-longtermGeneral backlog priority. Lower than priority/important-longterm
Type
Fields
Give feedbackNo fields configured for issues without a type.
humanizeBytes(apps/console/src/lib/k8s-quantity.ts:32) has branches for Ti/Gi/Mi and then falls through to${bytes}B, with no Ki branch. Any value in the range [1024, 1024²) bytes is rendered as raw bytes — for example a 512Ki PersistentVolumeClaim shows as524288Binstead of512Ki.This surfaces in the Storage admin views (
ClusterStorageSection,StorageClassUsagePage), which feed PVC requested/bound sizes throughhumanizeBytes. PVCs are usually Gi-sized, so it rarely bites in practice, but any Ki/sub-Mi value displays incorrectly.The current behavior is pinned by
k8s-quantity.test.ts, so the fix must update that test.Suggested fix: add a
bytes >= 1024→Kibranch before the bytes fallback, with a test covering a Ki-range value.