[ARVADOS] updated: 1.2.0-38-gfea9d9917

Git user git at public.curoverse.com
Mon Sep 10 17:02:02 EDT 2018


Summary of changes:
 lib/controller/federation.go      | 2 +-
 lib/controller/federation_test.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

       via  fea9d9917d21867fab4e2f94cefe3a8d16b88d3d (commit)
      from  f7fe4c8c4ba93eb1746c5392a820af78c2ed2562 (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 fea9d9917d21867fab4e2f94cefe3a8d16b88d3d
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Mon Sep 10 16:49:18 2018 -0400

    14087: Check for remote clusters before searching
    
    Added some more comments about the implementation as well.
    
    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 286b4206c..6b90432d1 100644
--- a/lib/controller/federation.go
+++ b/lib/controller/federation.go
@@ -233,7 +233,7 @@ func (s *searchRemoteClusterForPDH) filterRemoteClusterResponse(resp *http.Respo
 
 func (h *collectionFederatedRequestHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
 	m := collectionByPDHRe.FindStringSubmatch(req.URL.Path)
-	if len(m) == 2 {
+	if len(m) == 2 && len(h.handler.Cluster.RemoteClusters) > 0 {
 		bearer := req.Header.Get("Authorization")
 		if strings.HasPrefix(bearer, "Bearer v2/") &&
 			len(bearer) > 10 &&
diff --git a/lib/controller/federation_test.go b/lib/controller/federation_test.go
index 338a81ae6..f423b9931 100644
--- a/lib/controller/federation_test.go
+++ b/lib/controller/federation_test.go
@@ -414,7 +414,7 @@ func (s *FederationSuite) TestGetCollectionByPDHError(c *check.C) {
 	resp := s.testRequest(req)
 	defer resp.Body.Close()
 
-	c.Check(resp.StatusCode, check.Equals, http.StatusBadGateway)
+	c.Check(resp.StatusCode, check.Equals, http.StatusNotFound)
 }
 
 func (s *FederationSuite) TestSaltedTokenGetCollectionByPDH(c *check.C) {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list