[ARVADOS] updated: e1fd558686c78d6edfd460b7531ec9b559299889

Git user git at public.curoverse.com
Thu Jan 19 15:51:33 EST 2017


Summary of changes:
 .../app/views/work_units/_show_child.html.erb      |   2 +-
 .../app/views/work_units/_show_component.html.erb  |   2 +-
 backports/python-ciso8601/fpm-info.sh              |   3 -
 backports/python-llfuse/fpm-info.sh                |   7 -
 backports/python-pycrypto/fpm-info.sh              |   3 -
 backports/python-pycurl/fpm-info.sh                |  44 ---
 backports/rpm-fuse-devel/fpm-info.sh               |   5 -
 backports/rpm-fuse/fpm-info.sh                     |   5 -
 build/build.list                                   |  44 +++
 build/libcloud-pin                                 |   2 +-
 build/run-build-packages-one-target.sh             |   5 +-
 build/run-build-packages.sh                        | 379 ++++++++++++---------
 build/run-library.sh                               | 103 +++++-
 doc/_includes/_install_git.liquid                  |   8 +-
 doc/_includes/_install_postgres_database.liquid    |   4 +-
 doc/_includes/_install_ruby_and_bundler.liquid     |   4 +-
 .../install-compute-node.html.textile.liquid       |   9 +-
 .../install-compute-node.html.textile.liquid       |   9 +-
 .../install-crunch-dispatch.html.textile.liquid    |   2 +-
 doc/install/install-docker.html.textile.liquid     | 241 -------------
 ...nstall-manual-prerequisites.html.textile.liquid |  16 +-
 doc/install/install-postgresql.html.textile.liquid |  16 -
 .../install-shell-server.html.textile.liquid       |  20 +-
 .../install-workbench-app.html.textile.liquid      |  10 +-
 doc/sdk/python/sdk-python.html.textile.liquid      |   9 +-
 doc/user/topics/arv-docker.html.textile.liquid     | 114 ++++---
 sdk/cli/bin/crunch-job                             |   1 +
 sdk/cwl/setup.py                                   |   2 +-
 sdk/go/arvados/resource_list.go                    |   2 +-
 sdk/python/arvados/arvfile.py                      |   7 +-
 sdk/python/arvados/collection.py                   |  20 +-
 sdk/python/arvados/commands/put.py                 |  34 +-
 .../api/app/controllers/application_controller.rb  |   8 +-
 .../controllers/arvados/v1/schema_controller.rb    |   6 +-
 services/api/lib/crunch_dispatch.rb                |  24 +-
 .../api/test/functional/arvados/v1/query_test.rb   |  29 ++
 services/api/test/unit/crunch_dispatch_test.rb     |   3 +-
 services/keep-balance/collection.go                |   4 +-
 38 files changed, 558 insertions(+), 648 deletions(-)
 delete mode 100644 backports/rpm-fuse-devel/fpm-info.sh
 delete mode 100644 backports/rpm-fuse/fpm-info.sh
 create mode 100644 build/build.list
 delete mode 100644 doc/install/install-docker.html.textile.liquid

       via  e1fd558686c78d6edfd460b7531ec9b559299889 (commit)
       via  4696633ae5e955c267d50a14e790c93d833f41b0 (commit)
       via  6441ff0411fc0316c0825e8647150b1e079256ab (commit)
       via  afa8e5f3339bfe899c5c3d08032798f7977085f9 (commit)
       via  c8aa6553fd4af8be3ca9b1d9d9d660750cd59d1b (commit)
       via  c01ce0788adade520dc825152685aee0449a7da4 (commit)
       via  221c7d2f37a7a83a424597b11e13b638d6e1c21a (commit)
       via  df39fa6468ecb8d428a808392fc948426b602fc6 (commit)
       via  9adf8bd2a5e9e605a38026b70a52fb2ca63b33be (commit)
       via  b0e6c00576257cef24cfd0599073f58904a2b85c (commit)
       via  7bba7e6419737055ad26c23c9dd3bbacb983cb87 (commit)
       via  4dd318184615c0ff83501dfa7935daea5511bb17 (commit)
       via  88e0523b21ceab4bf56a4b5b130a92662c96e002 (commit)
       via  69f7fc66538ffa970bcf3b4169993ba1a146703f (commit)
       via  c21a47f1892748d0fd87771d4e033ddebf71faa5 (commit)
       via  1852b22218ae7b997cb1980d7b33fd1c8879163b (commit)
       via  beb640f493b0828898e83608e6994ff95811dada (commit)
       via  5add8076df3bb034a9e0029a52cbc61e4bb9275e (commit)
       via  6d03851fc13ee6cfb492185a44834bb9873314dd (commit)
       via  55727c5da7f9c5a549e42750d9966b53a486ca68 (commit)
       via  f447c6158d00bdd2c5ab01983065a24670d225df (commit)
       via  d424b38e1c9ca45ba2e845e1a66decf1d2eef75b (commit)
       via  735ffe841b0142d663c5f40b40ec55db2191b2b0 (commit)
       via  6a4e648c4818c2c53fa06984b433cd8dfbf1884f (commit)
       via  3794edbc25662a4df161933cac2e91bfbb3e163c (commit)
       via  935c8f81f0a041a58bbb45602ef44cdd6673163a (commit)
       via  1ccb1dbb6a3d342a647e2f5ab8d0f3d99d048a6b (commit)
       via  d3ae482ebaf8c3c489f4d410ff2f5b6a550515e2 (commit)
       via  f8b2e8039c96c6ad101f83012d7abf1c45b12ab2 (commit)
       via  6da5c2c733a3a3194887502d5cdb5a8446fbf7e0 (commit)
      from  609646134bcd8fc3a7fd500848220741ecc4a9d2 (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 e1fd558686c78d6edfd460b7531ec9b559299889
Merge: 4696633 6441ff0
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jan 19 15:51:18 2017 -0500

    Merge branch 'master' into 9998-no-count-items-available


commit 4696633ae5e955c267d50a14e790c93d833f41b0
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jan 19 15:50:55 2017 -0500

    9998: Change count=true/false to exact/none. Add tests.

diff --git a/sdk/go/arvados/resource_list.go b/sdk/go/arvados/resource_list.go
index 0cc6658..34b0c2f 100644
--- a/sdk/go/arvados/resource_list.go
+++ b/sdk/go/arvados/resource_list.go
@@ -12,7 +12,7 @@ type ResourceListParams struct {
 	Offset       int      `json:"offset,omitempty"`
 	Order        string   `json:"order,omitempty"`
 	Distinct     bool     `json:"distinct,omitempty"`
-	Count        bool     `json:"count,omitempty"`
+	Count        string   `json:"count,omitempty"`
 }
 
 // A Filter restricts the set of records returned by a list/index API.
diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb
index 3876e67..2285119 100644
--- a/services/api/app/controllers/application_controller.rb
+++ b/services/api/app/controllers/application_controller.rb
@@ -506,12 +506,16 @@ class ApplicationController < ActionController::Base
       :limit => @limit,
       :items => @objects.as_api_response(nil, {select: @select})
     }
-    if params[:count].nil? || params[:count]
+    case params[:count]
+    when nil, '', 'exact'
       if @objects.respond_to? :except
         list[:items_available] = @objects.
           except(:limit).except(:offset).
           count(:id, distinct: true)
       end
+    when 'none'
+    else
+      raise ArgumentError.new("count parameter must be 'exact' or 'none'")
     end
     list
   end
@@ -574,7 +578,7 @@ class ApplicationController < ActionController::Base
       distinct: { type: 'boolean', required: false },
       limit: { type: 'integer', required: false, default: DEFAULT_LIMIT },
       offset: { type: 'integer', required: false, default: 0 },
-      count: { type: 'boolean', required: false, default: true},
+      count: { type: 'string', required: false, default: 'exact' },
     }
   end
 
diff --git a/services/api/app/controllers/arvados/v1/schema_controller.rb b/services/api/app/controllers/arvados/v1/schema_controller.rb
index 2eaeb90..e2537a5 100644
--- a/services/api/app/controllers/arvados/v1/schema_controller.rb
+++ b/services/api/app/controllers/arvados/v1/schema_controller.rb
@@ -255,9 +255,9 @@ class Arvados::V1::SchemaController < ApplicationController
                   location: "query"
                 },
                 count: {
-                  type: "boolean",
-                  description: "Count items_available.",
-                  default: "true",
+                  type: "string",
+                  description: "Type of count to return in items_available ('none' or 'exact').",
+                  default: "exact",
                   location: "query"
                 }
               },
diff --git a/services/api/test/functional/arvados/v1/query_test.rb b/services/api/test/functional/arvados/v1/query_test.rb
index 91fe077..666b9a2 100644
--- a/services/api/test/functional/arvados/v1/query_test.rb
+++ b/services/api/test/functional/arvados/v1/query_test.rb
@@ -65,4 +65,33 @@ class Arvados::V1::QueryTest < ActionController::TestCase
     assert_equal('logs.event_type asc, logs.id asc',
                  assigns(:objects).order_values.join(', '))
   end
+
+  test 'do not count items_available if count=none' do
+    @controller = Arvados::V1::SpecimensController.new
+    authorize_with :active
+    get :index, {
+      count: 'none',
+    }
+    assert_response(:success)
+    refute(json_response.has_key?('items_available'))
+  end
+
+  [{}, {count: nil}, {count: ''}, {count: 'exact'}].each do |params|
+    test "count items_available if params=#{params.inspect}" do
+      @controller = Arvados::V1::SpecimensController.new
+      authorize_with :active
+      get :index, params
+      assert_response(:success)
+      assert_operator(json_response['items_available'], :>, 0)
+    end
+  end
+
+  test 'error if count=bogus' do
+    @controller = Arvados::V1::SpecimensController.new
+    authorize_with :active
+    get :index, {
+      count: 'bogus',
+    }
+    assert_response(422)
+  end
 end
diff --git a/services/keep-balance/collection.go b/services/keep-balance/collection.go
index 15556ed..e8ac30b 100644
--- a/services/keep-balance/collection.go
+++ b/services/keep-balance/collection.go
@@ -11,7 +11,7 @@ func countCollections(c *arvados.Client, params arvados.ResourceListParams) (int
 	var page arvados.CollectionList
 	var zero int
 	params.Limit = &zero
-	params.Count = true
+	params.Count = "exact"
 	err := c.RequestAndDecode(&page, "GET", "arvados/v1/collections", nil, params)
 	return page.ItemsAvailable, err
 }
@@ -46,7 +46,7 @@ func EachCollection(c *arvados.Client, pageSize int, f func(arvados.Collection)
 	params := arvados.ResourceListParams{
 		Limit:        &limit,
 		Order:        "modified_at, uuid",
-		Count:        false,
+		Count:        "none",
 		Select:       []string{"uuid", "unsigned_manifest_text", "modified_at", "portable_data_hash", "replication_desired"},
 		IncludeTrash: true,
 	}

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list