chia7712 commented on code in PR #761:
URL: https://github.com/apache/yunikorn-core/pull/761#discussion_r1436175160


##########
pkg/common/configs/configvalidator.go:
##########
@@ -213,9 +213,12 @@ func checkLimitResource(cur QueueConfig, users 
map[string]map[string]*resources.
 func checkQueueMaxApplications(cur QueueConfig) error {
        var err error
        for _, child := range cur.Queues {
-               if cur.MaxApplications != 0 && (cur.MaxApplications < 
child.MaxApplications || child.MaxApplications == 0) {
+               if cur.MaxApplications != 0 && cur.MaxApplications < 
child.MaxApplications {
                        return fmt.Errorf("parent maxApplications must be 
larger than child maxApplications")
                }
+               if cur.MaxApplications != 0 && child.MaxApplications == 0 {
+                       return fmt.Errorf("maxApplications is either undefined 
or zero, which is not allowed when parent queue's maxApplications is defined")
+               }

Review Comment:
   > my stance is that we don't need this check. 
   
   Sorry that I neglected your comment before.
   
   > If we submit it, then it has to be reverted in YUNIKORN-2258. So I don't 
see the point of adding it.
   
   The reasons I want to merge it are shown below.
   
   1. YUNIKORN-2258 hasn't yet reached consensus, so it may still open in next 
release. Hence, the error message added by this PR can give more readable 
output when users encounter such issue.
   
   2. The changes introduced by this PR is small, so it wouldn't burn out our 
servers 😀 
   



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