[ARVADOS] updated: 68967945ac9dfb524e196bcc2a4c259d115cdb6a
git at public.curoverse.com
git at public.curoverse.com
Thu Jan 14 11:27:52 EST 2016
Summary of changes:
apps/workbench/app/models/arvados_resource_list.rb | 2 +-
services/api/config/application.default.yml | 6 ++++++
services/api/lib/load_param.rb | 6 ++----
3 files changed, 9 insertions(+), 5 deletions(-)
discards 37a1505b607bbf533512f48b47f208c5cde4c435 (commit)
via 68967945ac9dfb524e196bcc2a4c259d115cdb6a (commit)
via f918d79484a5e355c9aae1dfc6622e6fe7c96f7f (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (37a1505b607bbf533512f48b47f208c5cde4c435)
\
N -- N -- N (68967945ac9dfb524e196bcc2a4c259d115cdb6a)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
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 68967945ac9dfb524e196bcc2a4c259d115cdb6a
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Jan 14 11:27:08 2016 -0500
8189: Replace MAX_LIMIT const with max_items_per_response config.
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index 8777f28..40c9ef6 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -188,6 +188,12 @@ common:
# for other data types.
max_index_database_read: 134217728
+ # Maximum number of items to return when responding to a APIs that
+ # can return partial result sets using limit and offset parameters
+ # (e.g., *.index, groups.contents). If a request specifies a "limit"
+ # parameter higher than this value, this value is used instead.
+ max_items_per_response: 1000
+
# When you run the db:delete_old_job_logs task, it will find jobs that
# have been finished for at least this many seconds, and delete their
# stderr logs from the logs table.
diff --git a/services/api/lib/load_param.rb b/services/api/lib/load_param.rb
index 35f1d0b..718aaea 100644
--- a/services/api/lib/load_param.rb
+++ b/services/api/lib/load_param.rb
@@ -9,9 +9,6 @@ module LoadParam
# Default number of rows to return in a single query.
DEFAULT_LIMIT = 100
- # Maximum number of rows to return in a single query, even if the client asks for more.
- MAX_LIMIT = 1000
-
# Load params[:where] into @where
def load_where_param
if params[:where].nil? or params[:where] == ""
@@ -54,7 +51,8 @@ module LoadParam
unless params[:limit].to_s.match(/^\d+$/)
raise ArgumentError.new("Invalid value for limit parameter")
end
- @limit = [params[:limit].to_i, MAX_LIMIT].min
+ @limit = [params[:limit].to_i,
+ Rails.configuration.max_items_per_response].min
else
@limit = DEFAULT_LIMIT
end
commit f918d79484a5e355c9aae1dfc6622e6fe7c96f7f
Author: Ward Vandewege <ward at curoverse.com>
Date: Thu Jan 14 11:01:04 2016 -0500
8189: Fix too-small page size in "fetch all pages" code.
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.
diff --git a/apps/workbench/app/models/arvados_resource_list.rb b/apps/workbench/app/models/arvados_resource_list.rb
index 9f66d39..1be06d8 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 - 1) - 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