[release-1.14] fix(capacity): avoid false exceeds on missing parent scalar keys - #5218
Conversation
Use child.GreaterPartly(parent, Infinity) in hierarchical capability validation so child-only scalar dimensions no longer trigger false parent-exceeded errors when parent/root does not define those keys. This preserves real exceed detection and reduces noisy logs after resource-class changes such as MIG key removals. Signed-off-by: Hajnal Máté <mate.hajnal@aumovio.com> Signed-off-by: Hajnal Máté <hajnalmt@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a new test function TestResource_GreaterPartly in resource_info_test.go to validate resource comparison logic across various scenarios. Additionally, it updates the checkHierarchicalQueue function in capacity.go to utilize GreaterPartly for capability checks, which now includes the specific resources exceeding parent limits in the error logs. I have no feedback to provide.
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hajnalmt, JesseStutler The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
339f970
into
volcano-sh:release-1.14
This is an automated cherry-pick of #5176