21200: copied branch from arvados-workbench2 Arvados-DCO-1.1-Signed-off-by: Lisa...
[arvados.git] / lib / controller / federation / conn.go
index bd5a6d812ea893307fac43cb89a2410adae77e7d..c5facdc7d9cf58fd2dbfa01091620a0a528e2381 100644 (file)
@@ -225,11 +225,11 @@ func (conn *Conn) ConfigGet(ctx context.Context) (json.RawMessage, error) {
 }
 
 func (conn *Conn) VocabularyGet(ctx context.Context) (arvados.Vocabulary, error) {
-       return conn.chooseBackend(conn.cluster.ClusterID).VocabularyGet(ctx)
+       return conn.local.VocabularyGet(ctx)
 }
 
 func (conn *Conn) DiscoveryDocument(ctx context.Context) (arvados.DiscoveryDocument, error) {
-       return conn.chooseBackend(conn.cluster.ClusterID).DiscoveryDocument(ctx)
+       return conn.local.DiscoveryDocument(ctx)
 }
 
 func (conn *Conn) Login(ctx context.Context, options arvados.LoginOptions) (arvados.LoginResponse, error) {
@@ -705,7 +705,6 @@ func (conn *Conn) batchUpdateUsers(ctx context.Context,
                        delete(updates, "is_admin")
                        delete(updates, "is_invited")
                }
-               fmt.Printf("updates %v", updates)
                batchOpts.Updates[user.UUID] = updates
        }
        if len(batchOpts.Updates) > 0 {
@@ -725,6 +724,10 @@ func (conn *Conn) includeAdminAndInvitedInBatchUpdate(ctx context.Context, be ba
        // fields aren't actually valid then we don't want to
        // send them in the batch update.
        dd, err := be.DiscoveryDocument(ctx)
+       if err != nil {
+               // couldn't get discovery document
+               return false, err
+       }
        if dd.Revision >= "20231117" {
                // newer version, fields are valid.
                return true, nil