[ARVADOS] updated: 1.2.0-73-g728b7ee1f

Git user git at public.curoverse.com
Thu Oct 4 20:50:05 EDT 2018


Summary of changes:
 .../api/app/controllers/arvados/v1/collections_controller.rb   |  4 +++-
 .../test/functional/arvados/v1/collections_controller_test.rb  | 10 ++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

       via  728b7ee1f1501e8bf5b5f9c4310d1fb5475ec79e (commit)
      from  652e26feea271a3d86430cd494503ff96e11dc9f (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 728b7ee1f1501e8bf5b5f9c4310d1fb5475ec79e
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Thu Oct 4 21:49:25 2018 -0300

    13561: Allow request old collection version by UUID.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/api/app/controllers/arvados/v1/collections_controller.rb b/services/api/app/controllers/arvados/v1/collections_controller.rb
index 1d4ade6dd..18b88c4d4 100644
--- a/services/api/app/controllers/arvados/v1/collections_controller.rb
+++ b/services/api/app/controllers/arvados/v1/collections_controller.rb
@@ -36,7 +36,7 @@ class Arvados::V1::CollectionsController < ApplicationController
     if params[:include_trash] || ['destroy', 'trash', 'untrash'].include?(action_name)
       opts.update({include_trash: true})
     end
-    if params[:include_old_versions]
+    if params[:include_old_versions] || @include_old_versions
       opts.update({include_old_versions: true})
     end
     @objects = Collection.readable_by(*@read_users, opts) if !opts.empty?
@@ -44,6 +44,8 @@ class Arvados::V1::CollectionsController < ApplicationController
   end
 
   def find_object_by_uuid
+    @include_old_versions = true
+
     if loc = Keep::Locator.parse(params[:id])
       loc.strip_hints!
 
diff --git a/services/api/test/functional/arvados/v1/collections_controller_test.rb b/services/api/test/functional/arvados/v1/collections_controller_test.rb
index 2b595a115..88f647c14 100644
--- a/services/api/test/functional/arvados/v1/collections_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb
@@ -1174,6 +1174,16 @@ EOS
     end
   end
 
+  test 'can get old version collection by uuid' do
+    authorize_with :active
+    get :show, {
+      id: collections(:collection_owned_by_active_past_version_1).uuid,
+    }
+    assert_response :success
+    assert_equal collections(:collection_owned_by_active_past_version_1).name,
+                  json_response['name']
+  end
+
   test 'version and current_version_uuid are ignored at creation time' do
     permit_unsigned_manifests
     authorize_with :active

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list