[ARVADOS] created: 37a1505b607bbf533512f48b47f208c5cde4c435

git at public.curoverse.com git at public.curoverse.com
Thu Jan 14 11:01:53 EST 2016


        at  37a1505b607bbf533512f48b47f208c5cde4c435 (commit)


commit 37a1505b607bbf533512f48b47f208c5cde4c435
Author: Ward Vandewege <ward at curoverse.com>
Date:   Thu Jan 14 11:01:04 2016 -0500

    Make the Python SDK and workbench effectively default to the API
    server's MAX_LIMIT when requesting a list of objects, in those cases
    where no explicit limit is set in the client code.
    
    closes #8189

diff --git a/apps/workbench/app/models/arvados_resource_list.rb b/apps/workbench/app/models/arvados_resource_list.rb
index 9f66d39..5bc4ef5 100644
--- a/apps/workbench/app/models/arvados_resource_list.rb
+++ b/apps/workbench/app/models/arvados_resource_list.rb
@@ -184,7 +184,8 @@ class ArvadosResourceList
     api_params[:order] = @orderby_spec if @orderby_spec
     api_params[:filters] = @filters if @filters
     api_params[:distinct] = @distinct if @distinct
-
+    # Default limit to (effectively) api server's MAX_LIMIT
+    api_params[:limit] = (2**(0.size * 8 -2) -1)
 
     item_count = 0
     offset = @offset || 0
diff --git a/sdk/python/arvados/util.py b/sdk/python/arvados/util.py
index 3e59bfb..2ac6ab9 100644
--- a/sdk/python/arvados/util.py
+++ b/sdk/python/arvados/util.py
@@ -363,6 +363,8 @@ def is_hex(s, *length_args):
     return bool(good_len and HEX_RE.match(s))
 
 def list_all(fn, num_retries=0, **kwargs):
+    # Default limit to (effectively) api server's MAX_LIMIT
+    kwargs.setdefault('limit', sys.maxint)
     items = []
     offset = 0
     items_available = sys.maxint

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list