[arvados] updated: 2.7.0-6475-g293631794d

git repository hosting git at public.arvados.org
Tue Apr 30 18:02:55 UTC 2024


Summary of changes:
 services/keepstore/router.go      | 2 +-
 services/keepstore/router_test.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

       via  293631794d64c64986ba0db2568345c005c90790 (commit)
      from  d9592ca6a1a9da3adb5c7a5b8201765dad3af93b (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 293631794d64c64986ba0db2568345c005c90790
Author: Tom Clegg <tom at curii.com>
Date:   Tue Apr 30 14:02:23 2024 -0400

    21717: Fix incorrect header.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/services/keepstore/router.go b/services/keepstore/router.go
index b462487a3d..dfb2ace3a7 100644
--- a/services/keepstore/router.go
+++ b/services/keepstore/router.go
@@ -110,7 +110,7 @@ func (rtr *router) handleBlockRead(w http.ResponseWriter, req *http.Request) {
 
 func (rtr *router) handleBlockWrite(w http.ResponseWriter, req *http.Request) {
 	dataSize, _ := strconv.Atoi(req.Header.Get("Content-Length"))
-	replicas, _ := strconv.Atoi(req.Header.Get("X-Arvados-Desired-Replicas"))
+	replicas, _ := strconv.Atoi(req.Header.Get(keepclient.XKeepDesiredReplicas))
 	resp, err := rtr.keepstore.BlockWrite(req.Context(), arvados.BlockWriteOptions{
 		Hash:           mux.Vars(req)["locator"],
 		Reader:         req.Body,
diff --git a/services/keepstore/router_test.go b/services/keepstore/router_test.go
index 9fc6e1b7db..215033b48e 100644
--- a/services/keepstore/router_test.go
+++ b/services/keepstore/router_test.go
@@ -200,7 +200,7 @@ func (s *routerSuite) TestBlockWrite_Headers(c *C) {
 	router, cancel := testRouter(c, s.cluster, nil)
 	defer cancel()
 
-	resp := call(router, "PUT", "http://example/"+fooHash, arvadostest.ActiveTokenV2, []byte("foo"), http.Header{"X-Arvados-Desired-Replicas": []string{"2"}})
+	resp := call(router, "PUT", "http://example/"+fooHash, arvadostest.ActiveTokenV2, []byte("foo"), http.Header{"X-Keep-Desired-Replicas": []string{"2"}})
 	c.Check(resp.Code, Equals, http.StatusOK)
 	c.Check(resp.Header().Get("X-Keep-Replicas-Stored"), Equals, "1")
 	c.Check(sortCommaSeparated(resp.Header().Get("X-Keep-Storage-Classes-Confirmed")), Equals, "testclass1=1")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list