holdenk commented on a change in pull request #231:
URL: 
https://github.com/apache/incubator-yunikorn-core/pull/231#discussion_r546105773



##########
File path: pkg/webservice/handlers.go
##########
@@ -457,7 +457,36 @@ func getClusterConfig(w http.ResponseWriter, r 
*http.Request) {
        }
 }
 
-func updateConfig(w http.ResponseWriter, r *http.Request) {
+func createClusterConfig(w http.ResponseWriter, r *http.Request) {
+       writeHeaders(w)
+
+       queryParams := r.URL.Query()
+       _, dryRunExists := queryParams["dry_run"]
+       if len(queryParams) == 0 || !dryRunExists {
+               http.Error(w, "Mandatory parameters are missing in URL path. 
Please check the usage documentation", http.StatusBadRequest)
+               return
+       }
+       if queryParams.Get("dry_run") != "1" {
+               http.Error(w, "Invalid query params. Please check the usage 
documentation", http.StatusBadRequest)
+               return
+       }

Review comment:
       This seems to require that dry run is set, which is confusing. Could the 
error message maybe state what parameter is missing or what parameter is 
invalid?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to