[ARVADOS] updated: 92d586bf985b811f730be93834f297a10288dcbb
Git user
git at public.curoverse.com
Fri May 20 08:31:45 EDT 2016
Summary of changes:
sdk/go/x/arvados/collection.go | 23 -----------------------
sdk/go/x/arvados/resource_list.go | 25 +++++++++++++++++++++++++
sdk/go/x/arvados/resource_list_test.go | 21 +++++++++++++++++++++
services/keep-balance/main.go | 4 ++--
4 files changed, 48 insertions(+), 25 deletions(-)
create mode 100644 sdk/go/x/arvados/resource_list.go
create mode 100644 sdk/go/x/arvados/resource_list_test.go
via 92d586bf985b811f730be93834f297a10288dcbb (commit)
via 464e6ca61f815222925c4d75dea0dc8164c50b14 (commit)
via bf51643f601fdf168d7b45b5e266418f039df5a1 (commit)
from 5c27dc48c7007c1deff4b2877b2c81906df47015 (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 92d586bf985b811f730be93834f297a10288dcbb
Author: Tom Clegg <tom at curoverse.com>
Date: Fri May 20 08:31:35 2016 -0400
9162: Tweak test to not care about > as \u003e.
diff --git a/sdk/go/x/arvados/resource_list_test.go b/sdk/go/x/arvados/resource_list_test.go
index 07aec6e..b5e6e7d 100644
--- a/sdk/go/x/arvados/resource_list_test.go
+++ b/sdk/go/x/arvados/resource_list_test.go
@@ -11,11 +11,11 @@ func TestMarshalFiltersWithNanoseconds(t *testing.T) {
t0 := time.Now()
t0str := t0.Format(time.RFC3339Nano)
buf, err := json.Marshal([]Filter{
- {Attr: "modified_at", Operator: ">=", Operand: t0}})
+ {Attr: "modified_at", Operator: "=", Operand: t0}})
if err != nil {
t.Fatal(err)
}
- if expect := []byte(`[["modified_at","\u003e=","` + t0str + `"]]`); 0 != bytes.Compare(buf, expect) {
+ if expect := []byte(`[["modified_at","=","` + t0str + `"]]`); 0 != bytes.Compare(buf, expect) {
t.Errorf("Encoded as %q, expected %q", buf, expect)
}
}
commit 464e6ca61f815222925c4d75dea0dc8164c50b14
Author: Tom Clegg <tom at curoverse.com>
Date: Thu May 19 16:29:52 2016 -0400
9162: Test precision timestamp encoding.
diff --git a/sdk/go/x/arvados/collection.go b/sdk/go/x/arvados/collection.go
index 2aa0b09..b43cb98 100644
--- a/sdk/go/x/arvados/collection.go
+++ b/sdk/go/x/arvados/collection.go
@@ -2,7 +2,6 @@ package arvados
import (
"bufio"
- "encoding/json"
"fmt"
"strings"
"time"
@@ -62,28 +61,6 @@ type CollectionList struct {
Limit int `json:"limit"`
}
-// A Filter restricts the set of records returned by a list/index API.
-type Filter struct {
- Attr string
- Operator string
- Operand interface{}
-}
-
-// MarshalJSON encodes a Filter in the form expected by the API.
-func (f *Filter) MarshalJSON() ([]byte, error) {
- return json.Marshal([]interface{}{f.Attr, f.Operator, f.Operand})
-}
-
-// ResourceListParams expresses which results are requested in a
-// list/index API.
-type ResourceListParams struct {
- Select []string `json:"select,omitempty"`
- Filters []Filter `json:"filters,omitempty"`
- Limit *int `json:"limit,omitempty"`
- Offset int `json:"offset,omitempty"`
- Order string `json:"order,omitempty"`
-}
-
// EachCollection calls f once for every readable
// collection. EachCollection stops if it encounters an error, such as
// f returning a non-nil error.
diff --git a/sdk/go/x/arvados/resource_list.go b/sdk/go/x/arvados/resource_list.go
new file mode 100644
index 0000000..e9ea268
--- /dev/null
+++ b/sdk/go/x/arvados/resource_list.go
@@ -0,0 +1,25 @@
+package arvados
+
+import "encoding/json"
+
+// ResourceListParams expresses which results are requested in a
+// list/index API.
+type ResourceListParams struct {
+ Select []string `json:"select,omitempty"`
+ Filters []Filter `json:"filters,omitempty"`
+ Limit *int `json:"limit,omitempty"`
+ Offset int `json:"offset,omitempty"`
+ Order string `json:"order,omitempty"`
+}
+
+// A Filter restricts the set of records returned by a list/index API.
+type Filter struct {
+ Attr string
+ Operator string
+ Operand interface{}
+}
+
+// MarshalJSON encodes a Filter in the form expected by the API.
+func (f *Filter) MarshalJSON() ([]byte, error) {
+ return json.Marshal([]interface{}{f.Attr, f.Operator, f.Operand})
+}
diff --git a/sdk/go/x/arvados/resource_list_test.go b/sdk/go/x/arvados/resource_list_test.go
new file mode 100644
index 0000000..07aec6e
--- /dev/null
+++ b/sdk/go/x/arvados/resource_list_test.go
@@ -0,0 +1,21 @@
+package arvados
+
+import (
+ "bytes"
+ "encoding/json"
+ "testing"
+ "time"
+)
+
+func TestMarshalFiltersWithNanoseconds(t *testing.T) {
+ t0 := time.Now()
+ t0str := t0.Format(time.RFC3339Nano)
+ buf, err := json.Marshal([]Filter{
+ {Attr: "modified_at", Operator: ">=", Operand: t0}})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if expect := []byte(`[["modified_at","\u003e=","` + t0str + `"]]`); 0 != bytes.Compare(buf, expect) {
+ t.Errorf("Encoded as %q, expected %q", buf, expect)
+ }
+}
commit bf51643f601fdf168d7b45b5e266418f039df5a1
Author: Tom Clegg <tom at curoverse.com>
Date: Thu May 19 14:33:42 2016 -0400
9162: usage message tweaks
diff --git a/services/keep-balance/main.go b/services/keep-balance/main.go
index a301f8e..6b11311 100644
--- a/services/keep-balance/main.go
+++ b/services/keep-balance/main.go
@@ -44,9 +44,9 @@ func main() {
configPath := flag.String("config",
os.Getenv("HOME")+"/.config/arvados/keep-balance.json",
- "configuration file")
+ "`path` of json configuration file")
serviceListPath := flag.String("config.KeepServiceList", "",
- "list of keep services to balance, as given by `arv keep_service list` "+
+ "`path` of json file with list of keep services to balance, as given by \"arv keep_service list\" "+
"(default: config[\"KeepServiceList\"], or if none given, get all available services and filter by config[\"KeepServiceTypes\"])")
flag.BoolVar(&runOptions.CommitPulls, "commit-pulls", false,
"send pull requests (make more replicas of blocks that are underreplicated or are not in optimal rendezvous probe order)")
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list