[ARVADOS] updated: 2.1.0-121-g9d755d7dc

Git user git at public.arvados.org
Fri Nov 20 21:01:50 UTC 2020


Summary of changes:
 lib/controller/federation/conn.go | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

       via  9d755d7dc0df6975e8b46cbaac6867abefdd138f (commit)
      from  c11f254a98e7caf437422d86eab38c7ba4f04096 (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 9d755d7dc0df6975e8b46cbaac6867abefdd138f
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Fri Nov 20 16:01:25 2020 -0500

    17154: Copy updates on federated users to local cluster
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/lib/controller/federation/conn.go b/lib/controller/federation/conn.go
index 986faa7b0..0d155c673 100644
--- a/lib/controller/federation/conn.go
+++ b/lib/controller/federation/conn.go
@@ -462,7 +462,18 @@ func (conn *Conn) UserUpdate(ctx context.Context, options arvados.UpdateOptions)
 	if options.BypassFederation {
 		return conn.local.UserUpdate(ctx, options)
 	}
-	return conn.chooseBackend(options.UUID).UserUpdate(ctx, options)
+	resp, err := conn.chooseBackend(options.UUID).UserUpdate(ctx, options)
+	if err != nil {
+		return resp, err
+	}
+	if options.UUID[:5] != conn.cluster.ClusterID {
+		// Copy the updated user record to the local cluster
+		err = conn.batchUpdateUsers(ctx, arvados.ListOptions{}, []arvados.User{resp})
+		if err != nil {
+			return arvados.User{}, err
+		}
+	}
+	return resp, err
 }
 
 func (conn *Conn) UserUpdateUUID(ctx context.Context, options arvados.UpdateUUIDOptions) (arvados.User, error) {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list