wilfred-s commented on code in PR #748:
URL: https://github.com/apache/yunikorn-k8shim/pull/748#discussion_r1602772996
##########
pkg/common/utils/utils.go:
##########
@@ -102,13 +102,12 @@ func IsAssignedPod(pod *v1.Pod) bool {
}
func GetQueueNameFromPod(pod *v1.Pod) string {
- queueName := constants.ApplicationDefaultQueue
- if an := GetPodLabelValue(pod, constants.LabelQueueName); an != "" {
- queueName = an
- } else if qu := GetPodAnnotationValue(pod,
constants.AnnotationQueueName); qu != "" {
- queueName = qu
+ if queueName := GetPodLabelValue(pod, constants.LabelQueueName);
queueName != "" {
+ return queueName
+ } else if queueName := GetPodAnnotationValue(pod,
constants.AnnotationQueueName); queueName != "" {
Review Comment:
NIT: No need to have an `else` here as we return if we have a queue above
--
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]