[ARVADOS] updated: 1.3.0-2380-g9d58af594
Git user
git at public.arvados.org
Mon Mar 30 18:44:29 UTC 2020
Summary of changes:
sdk/go/arvados/api.go | 6 +++---
sdk/python/arvados/commands/federation_migrate.py | 18 +++++++++++++-----
2 files changed, 16 insertions(+), 8 deletions(-)
via 9d58af594107d1e2b704a20c004c5f3c0f1c9973 (commit)
from 74a5e8396af2f648a7a13de77be9565df98cc157 (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 9d58af594107d1e2b704a20c004c5f3c0f1c9973
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Mon Mar 30 14:43:36 2020 -0400
16263: Add omitempty to GetOptions
Don't try to migrate if activate_remote_user fails.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/sdk/go/arvados/api.go b/sdk/go/arvados/api.go
index 7bb3bfaa7..d5f5dcaf8 100644
--- a/sdk/go/arvados/api.go
+++ b/sdk/go/arvados/api.go
@@ -60,11 +60,11 @@ var (
)
type GetOptions struct {
- UUID string `json:"uuid"`
+ UUID string `json:"uuid",omitempty`
Select []string `json:"select"`
IncludeTrash bool `json:"include_trash"`
- ForwardedFor string `json:"forwarded_for"`
- Remote string `json:"remote"`
+ ForwardedFor string `json:"forwarded_for",omitempty`
+ Remote string `json:"remote",omitempty`
}
type UntrashOptions struct {
diff --git a/sdk/python/arvados/commands/federation_migrate.py b/sdk/python/arvados/commands/federation_migrate.py
index b66aa5d7c..344390b48 100755
--- a/sdk/python/arvados/commands/federation_migrate.py
+++ b/sdk/python/arvados/commands/federation_migrate.py
@@ -352,6 +352,8 @@ def main():
continue
# cluster where the migration is happening
+ remote_users = {}
+ got_error = False
for migratecluster in clusters:
migratearv = clusters[migratecluster]
@@ -361,14 +363,20 @@ def main():
newuser = activate_remote_user(args, email, homearv, migratearv, old_user_uuid, new_user_uuid)
if newuser is None:
- continue
+ got_error = True
+ remote_users[migratecluster] = newuser
+
+ if not got_error:
+ for migratecluster in clusters:
+ migratearv = clusters[migratecluster]
+ newuser = remote_users[migratecluster]
- print("(%s) Migrating %s to %s on %s" % (email, old_user_uuid, new_user_uuid, migratecluster))
+ print("(%s) Migrating %s to %s on %s" % (email, old_user_uuid, new_user_uuid, migratecluster))
- migrate_user(args, migratearv, email, new_user_uuid, old_user_uuid)
+ migrate_user(args, migratearv, email, new_user_uuid, old_user_uuid)
- if newuser['username'] != username:
- update_username(args, email, new_user_uuid, username, migratecluster, migratearv)
+ if newuser['username'] != username:
+ update_username(args, email, new_user_uuid, username, migratecluster, migratearv)
if __name__ == "__main__":
main()
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list