Huang-Wei commented on PR #673:
URL: https://github.com/apache/yunikorn-core/pull/673#issuecomment-1760487093

   Thanks @yzhangal @manirajv06 for the review. I added a minimum UT to repro 
the bug:
   
   ```console
   === RUN   TestPendingCalc
   2023-10-12T15:57:52.289-0700 INFO    core.scheduler.queue    
objects/queue.go:144    configured queue added to scheduler     {"queueName": 
"root"}
   2023-10-12T15:57:52.290-0700 INFO    core.scheduler.queue    
objects/queue.go:144    configured queue added to scheduler     {"queueName": 
"root.leaf"}
       queue_test.go:300: assertion failed: error is not nil: 
           
           Diff:
           --- metric output does not match expectation; want
           +++ got:
           @@ -1,10 +1,2 @@
           -(bytes.Buffer) # HELP yunikorn_root_leaf_queue_resource Queue 
resource metrics. State of the resource includes `guaranteed`, `max`, 
`allocated`, `pending`, `preempting`.
           -# TYPE yunikorn_root_leaf_queue_resource gauge
           
-yunikorn_root_leaf_queue_resource{resource="memory",state="pending"} 100
           
-yunikorn_root_leaf_queue_resource{resource="vcores",state="pending"} 10
           -# HELP yunikorn_root_queue_resource Queue resource metrics. State 
of the resource includes `guaranteed`, `max`, `allocated`, `pending`, 
`preempting`.
           -# TYPE yunikorn_root_queue_resource gauge
           -yunikorn_root_queue_resource{resource="memory",state="pending"} 100
           -yunikorn_root_queue_resource{resource="vcores",state="pending"} 10
           +(bytes.Buffer) 
            
           -
           : unexpected metrics
   --- FAIL: TestPendingCalc (0.00s)
   ```
   
   To ensure we have enough UT coverage on metrics, a follow-up PR would be a 
better bet.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to