laysfire commented on code in PR #750:
URL: https://github.com/apache/yunikorn-core/pull/750#discussion_r1442446124


##########
pkg/webservice/handlers.go:
##########
@@ -60,6 +60,27 @@ const (
        NodeDoesNotExists        = "Node not found"
 )
 
+var allowedActiveStatusMsg string
+var allowedAppActiveStates map[string]bool
+
+func init() {
+       allowedAppActiveStates = make(map[string]bool)
+
+       allowedAppActiveStates["new"] = true
+       allowedAppActiveStates["accepted"] = true
+       allowedAppActiveStates["starting"] = true
+       allowedAppActiveStates["running"] = true
+       allowedAppActiveStates["completing"] = true
+       allowedAppActiveStates["failing"] = true
+       allowedAppActiveStates["resuming"] = true
+
+       var activeStates []string
+       for k := range allowedAppActiveStates {
+               activeStates = append(activeStates, k)
+       }
+       allowedActiveStatusMsg = fmt.Sprintf("Only following active states are 
allowed: %s", strings.Join(activeStates, ","))

Review Comment:
   @chia7712 Thanks for review. In order to keep consistency, should change 
allowedAppActiveStates to allowedAppActiveStatuses?



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