Improper handling on CPU request/limit in dashboard #21811
Labels
area/dashboard
area/ts-workspace-client
Issues related to the Che workspace client https://github.com/eclipse/che-workspace-client/
kind/bug
Outline of a bug - must adhere to the bug report template.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
severity/P2
Has a minor but important impact to the usage or development of the system.
Describe the bug
When using devfiles that specify certain CPU limits/requests, Che returns invalid values for the CPU resource after adding the limit/request for the injected editor. Starting a workspace with a memory request of
4000m
, for example, results in the injected devfile requesting4030.0000000000005m
instead of4030m
. This occurs because the injected CPU request is30m
, which internally gets parsed toThe CPU virtual resource in Kubernetes uses
m
as the smallest unit, so fractionalm
values are invalid.Che version
7.56@latest
Steps to reproduce
Expected behavior
CPU request should be floored before returning to avoid fractional parts.
Runtime
other (please specify in additional context)
Screenshots
No response
Installation method
chectl/latest
Environment
Linux
Eclipse Che Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: