[ARVADOS] updated: cb07b2362dadab18abc43e2385cf7b54ed33a7e5

git at public.curoverse.com git at public.curoverse.com
Fri Aug 22 08:48:07 EDT 2014


Summary of changes:
 apps/workbench/test/integration/projects_test.rb                  | 6 +++---
 services/api/app/controllers/application_controller.rb            | 2 +-
 services/api/app/controllers/arvados/v1/collections_controller.rb | 6 ++----
 services/api/app/models/collection.rb                             | 1 -
 services/api/test/fixtures/specimens.yml                          | 6 ------
 services/api/test/fixtures/traits.yml                             | 5 +++++
 6 files changed, 11 insertions(+), 15 deletions(-)
 create mode 100644 services/api/test/fixtures/traits.yml

       via  cb07b2362dadab18abc43e2385cf7b54ed33a7e5 (commit)
      from  fe76288c35ce28b82bb050e18f0a0af24b05da0b (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 cb07b2362dadab18abc43e2385cf7b54ed33a7e5
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Aug 22 08:48:01 2014 -0400

    3036: Always select "id" column unless distinct = true.  Include uuid =
    portable_data_hash when requesting collection by uuid.  Changed test fixture
    "owned_by_aproject_with_no_name" to be a "human" instead of a "specimen"
    because the human table has a "name" column required by projects_test.

diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index 1207d30..8a80bc2 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -27,13 +27,13 @@ class ProjectsTest < ActionDispatch::IntegrationTest
 
   test 'Add a new name, then edit it, without creating a duplicate' do
     project_uuid = api_fixture('groups')['aproject']['uuid']
-    specimen_uuid = api_fixture('specimens')['owned_by_aproject_with_no_name']['uuid']
+    specimen_uuid = api_fixture('traits')['owned_by_aproject_with_no_name']['uuid']
     visit page_with_token 'active', '/projects/' + project_uuid
     click_link 'Other objects'
     within '.selection-action-container' do
       # Wait for the tab to load:
-      assert_selector 'tr[data-kind="arvados#specimen"]'
-      within first('tr', text: 'Specimen') do
+      assert_selector 'tr[data-kind="arvados#trait"]'
+      within first('tr', text: 'Trait') do
         find(".fa-pencil").click
         find('.editable-input input').set('Now I have a name.')
         find('.glyphicon-ok').click
diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb
index 2b52eab..1934504 100644
--- a/services/api/app/controllers/application_controller.rb
+++ b/services/api/app/controllers/application_controller.rb
@@ -214,7 +214,7 @@ class ApplicationController < ActionController::Base
         flat_map { |attr| api_column_map[attr] }.
         uniq.
         map { |s| "#{table_name}.#{ActiveRecord::Base.connection.quote_column_name s}" }
-      columns_list += ["#{table_name}.id"]
+      columns_list += ["#{table_name}.id"] if not @distinct
       @objects = @objects.select(columns_list.join(", "))
     end
     @objects = @objects.order(@orders.join ", ") if @orders.any?
diff --git a/services/api/app/controllers/arvados/v1/collections_controller.rb b/services/api/app/controllers/arvados/v1/collections_controller.rb
index e58b2e0..d31e59a 100644
--- a/services/api/app/controllers/arvados/v1/collections_controller.rb
+++ b/services/api/app/controllers/arvados/v1/collections_controller.rb
@@ -56,6 +56,7 @@ class Arvados::V1::CollectionsController < ApplicationController
       loc.strip_hints!
       if c = Collection.readable_by(*@read_users).where({ portable_data_hash: loc.to_s }).limit(1).first
         @object = {
+          uuid: c.portable_data_hash,
           portable_data_hash: c.portable_data_hash,
           manifest_text: c.manifest_text,
           files: c.files,
@@ -216,10 +217,7 @@ class Arvados::V1::CollectionsController < ApplicationController
   def find_objects_for_index
     # Omit manifest_text from index results unless expressly selected.
     if @select.nil?
-      @select = model_class.api_accessible_attributes(:user).map { |attr_spec|attr_spec.first.to_s }
-      @select -= ["manifest_text"]
-      # have to make sure 'id' column is included or #update will break.
-      @select += ["id"]
+      @select = model_class.api_accessible_attributes(:user).map { |attr_spec|attr_spec.first.to_s } - ["manifest_text"]
     end
     super
   end
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index 520f617..c0c2b7e 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -19,7 +19,6 @@ class Collection < ArvadosModel
   def self.attributes_required_columns
     super.merge({ "data_size" => ["manifest_text"],
                   "files" => ["manifest_text"],
-                  "id" => ["id"]
                 })
   end
 
diff --git a/services/api/test/fixtures/specimens.yml b/services/api/test/fixtures/specimens.yml
index ad94cba..074b88b 100644
--- a/services/api/test/fixtures/specimens.yml
+++ b/services/api/test/fixtures/specimens.yml
@@ -27,9 +27,3 @@ in_asubproject:
   owner_uuid: zzzzz-j7d0g-axqo7eu9pwvna1x
   created_at: 2014-04-21 15:37:48 -0400
   modified_at: 2014-04-21 15:37:48 -0400
-
-owned_by_aproject_with_no_name:
-  uuid: zzzzz-j58dm-ypsjlol9dofwijz
-  owner_uuid: zzzzz-j7d0g-v955i6s2oi1cbso
-  created_at: 2014-05-05 04:11:52 -0400
-  modified_at: 2014-05-05 04:11:52 -0400
diff --git a/services/api/test/fixtures/traits.yml b/services/api/test/fixtures/traits.yml
new file mode 100644
index 0000000..7628cd6
--- /dev/null
+++ b/services/api/test/fixtures/traits.yml
@@ -0,0 +1,5 @@
+owned_by_aproject_with_no_name:
+  uuid: zzzzz-q1cn2-ypsjlol9dofwijz
+  owner_uuid: zzzzz-j7d0g-v955i6s2oi1cbso
+  created_at: 2014-05-05 04:11:52 -0400
+  modified_at: 2014-05-05 04:11:52 -0400

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list