manirajv06 commented on code in PR #891:
URL: https://github.com/apache/yunikorn-core/pull/891#discussion_r1643952180


##########
pkg/common/configs/configvalidator.go:
##########
@@ -673,6 +677,22 @@ func checkQueues(queue *QueueConfig, level int) error {
        return nil
 }
 
+func IsQueueNameValid(queueName string) error {
+       if !QueueNameRegExp.MatchString(queueName) {
+               return fmt.Errorf("invalid child name '%s', a name must only 
have alphanumeric characters,"+
+                       " - or _, and be no longer than 64 characters", 
queueName)
+       }
+       return nil
+}
+
+func IsQueuePathValid(queuePath string) error {

Review Comment:
   Yes, length check is not required. However, I still see a need to do 
validate that code path because there is an option to pass the full queue path 
in the config. If we really want to avoid full queuePath check, we should split 
the string based on dot and apply queueName check itself for each part.



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