[ARVADOS] updated: 2.1.0-444-g9d1bd437b
Git user
git at public.arvados.org
Mon Mar 8 18:05:58 UTC 2021
Summary of changes:
lib/controller/federation/conn.go | 3 +--
lib/controller/router/response.go | 16 ++++++++++------
2 files changed, 11 insertions(+), 8 deletions(-)
via 9d1bd437bdfff9351958b4665b362c19ab2fa0a6 (commit)
from a439d4d3228cae6f2d518c24d1d58a259142e5cd (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 9d1bd437bdfff9351958b4665b362c19ab2fa0a6
Author: Ward Vandewege <ward at curii.com>
Date: Mon Mar 8 13:04:56 2021 -0500
17119: implement review feedback.
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>
diff --git a/lib/controller/federation/conn.go b/lib/controller/federation/conn.go
index 09540a5f4..a9352098d 100644
--- a/lib/controller/federation/conn.go
+++ b/lib/controller/federation/conn.go
@@ -423,8 +423,7 @@ func (conn *Conn) GroupContents(ctx context.Context, options arvados.GroupConten
}
func (conn *Conn) GroupShared(ctx context.Context, options arvados.ListOptions) (arvados.GroupList, error) {
- // FIXME is this right?? We don't have options.UUID to cue the chooseBackend off
- return conn.chooseBackend(conn.cluster.ClusterID).GroupShared(ctx, options)
+ return conn.chooseBackend(options.ClusterID).GroupShared(ctx, options)
}
func (conn *Conn) GroupDelete(ctx context.Context, options arvados.DeleteOptions) (arvados.Group, error) {
diff --git a/lib/controller/router/response.go b/lib/controller/router/response.go
index aee2fc590..b078b8300 100644
--- a/lib/controller/router/response.go
+++ b/lib/controller/router/response.go
@@ -82,15 +82,19 @@ func (rtr *router) sendResponse(w http.ResponseWriter, req *http.Request, resp i
defaultItemKind = strings.TrimSuffix(respKind, "List")
}
- var items, included []interface{}
- var itemsOK, includedOK bool
- items, itemsOK = tmp["items"].([]interface{})
- included, includedOK = tmp["included"].([]interface{})
- if includedOK && len(included) > 0 {
+ var items, tmpItems []interface{}
+ var isListResponse bool
+
+ // Make a new copy of the tmp["items"] slice as 'items' so that we can append to it safely.
+ if tmpItems, isListResponse = tmp["items"].([]interface{}); isListResponse {
+ items = append(items, tmpItems...)
+ }
+
+ if included, ok := tmp["included"].([]interface{}); ok {
items = append(items, included...)
}
- if itemsOK {
+ if isListResponse {
for i, item := range items {
// Fill in "kind" by inspecting UUID/PDH if
// possible; fall back on assuming each
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list