You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2021/09/23 00:41:01 UTC

[GitHub] [incubator-yunikorn-k8shim] yangwwei commented on a change in pull request #305: [YUNIKORN-858] Pass node labels as node attributes for node sorting

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



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

Review comment:
       what if `node.Labels` is nil?
   can we  also add a UT coverage for the case where node has no labels defined?




-- 
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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org