You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Monitor CPU chart: distinguish "no CPU limit" from "limit metric unavailable" #1644
Problem.MonitorData CPU usage is reported as a percentage of the workload's CPU limit. When the limit cannot be resolved, the code falls back to limit = 1 only to avoid division by zero (+Inf/NaN). The result is that a workload using 2 cores with no resolvable limit is shown as 100% after clamping, and the UI cannot tell two different situations apart:
the workload is confirmed to have no CPU limit configured;
the limit metric is unavailable (query failed, series missing, label mismatch).
A missing metric alone should not be treated as proof that there is no limit.
Proposal (shape open for discussion).
Return a null/absent percentage plus an explicit state for the limit (e.g. limit_state: configured | none | unavailable), so the UI can render "No limit" or "No data" instead of a made-up percentage.
Optionally report usage in cores in the no-limit / unavailable cases, so the chart still shows something useful.
Make sure the usage and limit queries refer to the same container (same label selectors), so the ratio is meaningful.
Keep the existing percentage contract unchanged when a limit is found.
This needs a response-contract decision and a frontend change, so I'd like to agree on the shape here before writing code. Happy to send a PR for the backend part once you pick one.
Activity