[arvados] created: 2.7.0-5813-gb9df494b62

git repository hosting git at public.arvados.org
Fri Jan 12 19:47:25 UTC 2024


        at  b9df494b629cfc4f79e7aa7951dcd5b5608eda9d (commit)


commit b9df494b629cfc4f79e7aa7951dcd5b5608eda9d
Author: Tom Clegg <tom at curii.com>
Date:   Fri Jan 12 14:43:43 2024 -0500

    21379: Follow rules for federated list queries.
    
    * cannot execute federated list query unless count=="none"
    
    * cannot execute federated list query with limit (1) < nUUIDs (1),
      offset (0) > 0, or order ([created_at]) parameter
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/tools/user-activity/arvados_user_activity/main.py b/tools/user-activity/arvados_user_activity/main.py
index ded96c3121..66d03b2041 100755
--- a/tools/user-activity/arvados_user_activity/main.py
+++ b/tools/user-activity/arvados_user_activity/main.py
@@ -96,6 +96,7 @@ collectionNameCache = {}
 def getCollectionName(arv, uuid, pdh):
     lookupField = uuid
     filters = [["uuid", "=", uuid]]
+    order = None
     cached = uuid in collectionNameCache
     # look up by uuid if it is available, fall back to look up by pdh
     if uuid is None or len(uuid) != 27:
@@ -105,10 +106,11 @@ def getCollectionName(arv, uuid, pdh):
         # name, if the uuid for the request is not known.
         lookupField = pdh
         filters = [["portable_data_hash", "=", pdh]]
+        order = "created_at"
         cached = pdh in collectionNameCache
 
     if not cached:
-        u = arv.collections().list(filters=filters, order="created_at", limit=1).execute().get("items")
+        u = arv.collections().list(filters=filters, order=order, limit=1, count="none").execute().get("items")
         if len(u) < 1:
             return "(deleted)"
         collectionNameCache[lookupField] = u[0]["name"]

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list