[ARVADOS] updated: 1.2.0-96-g1dd4997eb

Git user git at public.curoverse.com
Fri Sep 21 15:23:40 EDT 2018


Summary of changes:
 lib/controller/federation.go                           | 5 +++--
 services/api/app/controllers/application_controller.rb | 8 +++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

       via  1dd4997ebfe9e1bce4073aed9abb37f89ae90845 (commit)
      from  b23972dec86c459c2e89fbb0c021153db54e7efa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 1dd4997ebfe9e1bce4073aed9abb37f89ae90845
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Fri Sep 21 15:23:18 2018 -0400

    14197: Add cluster_id to discovery document for create method.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/lib/controller/federation.go b/lib/controller/federation.go
index 24c692aef..cc22a674d 100644
--- a/lib/controller/federation.go
+++ b/lib/controller/federation.go
@@ -89,7 +89,7 @@ func (h *genericFederatedRequestHandler) ServeHTTP(w http.ResponseWriter, req *h
 		}
 	}
 
-	if clusterId == "" && req.Method == "POST" {
+	if clusterId == "" && req.Method == "POST" && req.Header.Get("Content-Type") == "application/json" {
 		var hasClusterId struct {
 			ClusterID string `json:"cluster_id"`
 		}
@@ -104,7 +104,8 @@ func (h *genericFederatedRequestHandler) ServeHTTP(w http.ResponseWriter, req *h
 
 		err := json.NewDecoder(rdr).Decode(&hasClusterId)
 		if err != nil {
-			// TODO
+			httpserver.Error(w, err.Error(), http.StatusBadRequest)
+			return
 		}
 		req.Body = ioutil.NopCloser(postBody)
 
diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb
index 05b39c1ae..8589b3c7a 100644
--- a/services/api/app/controllers/application_controller.rb
+++ b/services/api/app/controllers/application_controller.rb
@@ -563,7 +563,13 @@ class ApplicationController < ActionController::Base
         location: "query",
         required: false,
         default: false
-      }
+      },
+      cluster_id: {
+        type: 'string',
+        description: "Create object on a remote federated cluster instead of the current one.",
+        location: "query",
+        required: false,
+      },
     }
   end
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list