yangwwei commented on a change in pull request #305:
URL: 
https://github.com/apache/incubator-yunikorn-k8shim/pull/305#discussion_r714403430



##########
File path: pkg/cache/nodes.go
##########
@@ -100,10 +101,18 @@ func (nc *schedulerNodes) addAndReportNode(node *v1.Node, 
reportNode bool) {
 
        // add node to nodes map
        if _, ok := nc.nodesMap[node.Name]; !ok {
+               nodeLabels, err := json.Marshal(node.Labels)
+               if err != nil {
+                       log.Logger().Error("failed to marshall node labels to 
json", zap.Error(err))
+                       return

Review comment:
       I don't think we should return here, even we can't marshall node labels, 
we should still report the node
   otherwise the node will be skipped adding to the scheduler, that might not 
be something we want




-- 
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