[ARVADOS] updated: 1.3.1-3-g1514cff07

Git user git at public.curoverse.com
Mon Apr 22 13:32:27 UTC 2019


Summary of changes:
 services/keep-balance/balance.go          | 18 ++++++++++++++++++
 services/keep-balance/balance_run_test.go |  2 ++
 2 files changed, 20 insertions(+)

       via  1514cff070fbd6479dc17d1108acdbaaa8203b82 (commit)
      from  eab2d73557c800cef739b55883fdfa945f38e65c (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 1514cff070fbd6479dc17d1108acdbaaa8203b82
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Mon Apr 22 03:06:18 2019 -0400

    15112: Refuse to run if modified_at column has any nulls.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/services/keep-balance/balance.go b/services/keep-balance/balance.go
index e1b207805..ab8aadca0 100644
--- a/services/keep-balance/balance.go
+++ b/services/keep-balance/balance.go
@@ -206,6 +206,24 @@ func (bal *Balancer) CheckSanityEarly(c *arvados.Client) error {
 			return fmt.Errorf("config error: %s: proxy servers cannot be balanced", srv)
 		}
 	}
+
+	var checkPage arvados.CollectionList
+	if err = c.RequestAndDecode(&checkPage, "GET", "arvados/v1/collections", nil, arvados.ResourceListParams{
+		Limit:              new(int),
+		Count:              "exact",
+		IncludeTrash:       true,
+		IncludeOldVersions: true,
+		Filters: []arvados.Filter{{
+			Attr:     "modified_at",
+			Operator: "=",
+			Operand:  nil,
+		}},
+	}); err != nil {
+		return err
+	} else if n := checkPage.ItemsAvailable; n > 0 {
+		return fmt.Errorf("%d collections exist with null modified_at; cannot fetch reliably", n)
+	}
+
 	return nil
 }
 
diff --git a/services/keep-balance/balance_run_test.go b/services/keep-balance/balance_run_test.go
index f7cb7f92b..545aeca86 100644
--- a/services/keep-balance/balance_run_test.go
+++ b/services/keep-balance/balance_run_test.go
@@ -203,6 +203,8 @@ func (s *stubServer) serveCollectionsButSkipOne() *reqTracker {
 			io.WriteString(w, `{"items_available":0,"items":[]}`)
 		} else if strings.Contains(r.Form.Get("filters"), `"modified_at","="`) && strings.Contains(r.Form.Get("filters"), `"uuid","\u003e"`) {
 			io.WriteString(w, `{"items_available":0,"items":[]}`)
+		} else if strings.Contains(r.Form.Get("filters"), `"modified_at","=",null`) {
+			io.WriteString(w, `{"items_available":0,"items":[]}`)
 		} else {
 			io.WriteString(w, `{"items_available":2,"items":[
 				{"uuid":"zzzzz-4zz18-ehbhgtheo8909or","portable_data_hash":"fa7aeb5140e2848d39b416daeef4ffc5+45","manifest_text":". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n","modified_at":"2014-02-03T17:22:54Z"},

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list