[arvados] updated: 2.6.0-549-g1464023a78

git repository hosting git at public.arvados.org
Sun Aug 27 04:01:56 UTC 2023


Summary of changes:
 sdk/python/arvados/commands/keepdocker.py | 15 +++++++++------
 sdk/python/arvados/util.py                | 10 ++++++++--
 2 files changed, 17 insertions(+), 8 deletions(-)

       via  1464023a780121196fd1d2c1cf672377644ef875 (commit)
       via  19a33694a34caf904b2b502e7a070bf9ffbcb1fc (commit)
      from  1fb91dca65538e49386fabf046f6163bd56c137c (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 1464023a780121196fd1d2c1cf672377644ef875
Author: Brett Smith <brett.smith at curii.com>
Date:   Sun Aug 27 00:01:16 2023 -0400

    20839: Replace arvados.util.list_all calls throughout
    
    In preparation to deprecate this function.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/python/arvados/commands/keepdocker.py b/sdk/python/arvados/commands/keepdocker.py
index 922256a27e..4c5b13aa17 100644
--- a/sdk/python/arvados/commands/keepdocker.py
+++ b/sdk/python/arvados/commands/keepdocker.py
@@ -240,8 +240,9 @@ def docker_link_sort_key(link):
     return (image_timestamp, created_timestamp)
 
 def _get_docker_links(api_client, num_retries, **kwargs):
-    links = arvados.util.list_all(api_client.links().list,
-                                  num_retries, **kwargs)
+    links = list(arvados.util.keyset_list_all(
+        api_client.links().list, num_retries=num_retries, **kwargs,
+    ))
     for link in links:
         link['_sort_key'] = docker_link_sort_key(link)
     links.sort(key=itemgetter('_sort_key'), reverse=True)
@@ -340,10 +341,12 @@ def list_images_in_arv(api_client, num_retries, image_name=None, image_tag=None,
         images.sort(key=itemgetter('_sort_key'), reverse=True)
 
     # Remove any image listings that refer to unknown collections.
-    existing_coll_uuids = {coll['uuid'] for coll in arvados.util.list_all(
-            api_client.collections().list, num_retries,
-            filters=[['uuid', 'in', [im['collection'] for im in images]]]+project_filter,
-            select=['uuid'])}
+    existing_coll_uuids = {coll['uuid'] for coll in arvados.util.keyset_list_all(
+        api_client.collections().list,
+        num_retries=num_retries,
+        filters=[['uuid', 'in', [im['collection'] for im in images]]]+project_filter,
+        select=['uuid'],
+    )}
     return [(image['collection'], image) for image in images
             if image['collection'] in existing_coll_uuids]
 

commit 19a33694a34caf904b2b502e7a070bf9ffbcb1fc
Author: Brett Smith <brett.smith at curii.com>
Date:   Sat Aug 26 23:59:21 2023 -0400

    20839: Add order_key to select in keyset_list_all
    
    Like uuid, the main loop requires this field.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/python/arvados/util.py b/sdk/python/arvados/util.py
index 2180016926..21afc26db5 100644
--- a/sdk/python/arvados/util.py
+++ b/sdk/python/arvados/util.py
@@ -470,8 +470,14 @@ def keyset_list_all(fn, order_key="created_at", num_retries=0, ascending=True, *
     kwargs["order"] = ["%s %s" % (order_key, asc), "uuid %s" % asc]
     other_filters = kwargs.get("filters", [])
 
-    if "select" in kwargs and "uuid" not in kwargs["select"]:
-        kwargs["select"].append("uuid")
+    try:
+        select = set(kwargs['select'])
+    except KeyError:
+        pass
+    else:
+        select.add(order_key)
+        select.add('uuid')
+        kwargs['select'] = list(select)
 
     nextpage = []
     tot = 0

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list