[ARVADOS] updated: 2.1.0-825-gf1aec3387

Git user git at public.arvados.org
Mon May 24 14:34:17 UTC 2021


Summary of changes:
 apps/workbench/app/models/arvados_resource_list.rb |  2 +-
 lib/controller/federation/generated.go             | 30 ++++++++++++++++++++++
 lib/controller/federation/list.go                  |  6 +++++
 3 files changed, 37 insertions(+), 1 deletion(-)

  discards  e5828e5166afc24bba4559e8df3000523595e298 (commit)
       via  f1aec3387f765a3f8a2f3f2c22d3a53fb4f9f1f3 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (e5828e5166afc24bba4559e8df3000523595e298)
            \
             N -- N -- N (f1aec3387f765a3f8a2f3f2c22d3a53fb4f9f1f3)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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 f1aec3387f765a3f8a2f3f2c22d3a53fb4f9f1f3
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Mon May 24 10:33:00 2021 -0400

    17702: Federated lists supports cluster_id parameter
    
    Use cluster_id parameter to override splitListRequest behavior in controller.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/apps/workbench/app/models/arvados_resource_list.rb b/apps/workbench/app/models/arvados_resource_list.rb
index 99502bd56..75a9429a4 100644
--- a/apps/workbench/app/models/arvados_resource_list.rb
+++ b/apps/workbench/app/models/arvados_resource_list.rb
@@ -223,6 +223,7 @@ class ArvadosResourceList
     api_params[:filters] = @filters if @filters
     api_params[:distinct] = @distinct if @distinct
     api_params[:include_trash] = @include_trash if @include_trash
+    api_params[:cluster_id] = Rails.configuration.ClusterID
     if @fetch_multiple_pages
       # Default limit to (effectively) api server's MAX_LIMIT
       api_params[:limit] = 2**(0.size*8 - 1) - 1
diff --git a/lib/controller/federation/generated.go b/lib/controller/federation/generated.go
index 49a2e5b75..3ede1f115 100755
--- a/lib/controller/federation/generated.go
+++ b/lib/controller/federation/generated.go
@@ -18,6 +18,12 @@ import (
 //
 
 func (conn *Conn) generated_ContainerList(ctx context.Context, options arvados.ListOptions) (arvados.ContainerList, error) {
+	if options.ClusterID != "" {
+		// explicitly selected cluster
+		options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
+		return conn.chooseBackend(options.ClusterID).ContainerList(ctx, options)
+	}
+
 	var mtx sync.Mutex
 	var merged arvados.ContainerList
 	var needSort atomic.Value
@@ -59,6 +65,12 @@ func (conn *Conn) generated_ContainerList(ctx context.Context, options arvados.L
 }
 
 func (conn *Conn) generated_ContainerRequestList(ctx context.Context, options arvados.ListOptions) (arvados.ContainerRequestList, error) {
+	if options.ClusterID != "" {
+		// explicitly selected cluster
+		options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
+		return conn.chooseBackend(options.ClusterID).ContainerRequestList(ctx, options)
+	}
+
 	var mtx sync.Mutex
 	var merged arvados.ContainerRequestList
 	var needSort atomic.Value
@@ -100,6 +112,12 @@ func (conn *Conn) generated_ContainerRequestList(ctx context.Context, options ar
 }
 
 func (conn *Conn) generated_GroupList(ctx context.Context, options arvados.ListOptions) (arvados.GroupList, error) {
+	if options.ClusterID != "" {
+		// explicitly selected cluster
+		options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
+		return conn.chooseBackend(options.ClusterID).GroupList(ctx, options)
+	}
+
 	var mtx sync.Mutex
 	var merged arvados.GroupList
 	var needSort atomic.Value
@@ -141,6 +159,12 @@ func (conn *Conn) generated_GroupList(ctx context.Context, options arvados.ListO
 }
 
 func (conn *Conn) generated_SpecimenList(ctx context.Context, options arvados.ListOptions) (arvados.SpecimenList, error) {
+	if options.ClusterID != "" {
+		// explicitly selected cluster
+		options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
+		return conn.chooseBackend(options.ClusterID).SpecimenList(ctx, options)
+	}
+
 	var mtx sync.Mutex
 	var merged arvados.SpecimenList
 	var needSort atomic.Value
@@ -182,6 +206,12 @@ func (conn *Conn) generated_SpecimenList(ctx context.Context, options arvados.Li
 }
 
 func (conn *Conn) generated_UserList(ctx context.Context, options arvados.ListOptions) (arvados.UserList, error) {
+	if options.ClusterID != "" {
+		// explicitly selected cluster
+		options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
+		return conn.chooseBackend(options.ClusterID).UserList(ctx, options)
+	}
+
 	var mtx sync.Mutex
 	var merged arvados.UserList
 	var needSort atomic.Value
diff --git a/lib/controller/federation/list.go b/lib/controller/federation/list.go
index 183557eb1..a9ac03ee5 100644
--- a/lib/controller/federation/list.go
+++ b/lib/controller/federation/list.go
@@ -22,6 +22,12 @@ import (
 // methods for other types; see generate.go.
 
 func (conn *Conn) generated_CollectionList(ctx context.Context, options arvados.ListOptions) (arvados.CollectionList, error) {
+	if options.ClusterID != "" {
+		// explicitly selected cluster
+		options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
+		return conn.chooseBackend(options.ClusterID).CollectionList(ctx, options)
+	}
+
 	var mtx sync.Mutex
 	var merged arvados.CollectionList
 	var needSort atomic.Value

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list