[ARVADOS] updated: 164ebe21b6dfa0de9db6cc450dd65ce734c43e21

git at public.curoverse.com git at public.curoverse.com
Mon Jan 5 11:18:56 EST 2015


Summary of changes:
 .../test/integration/pipeline_instances_test.rb    |   2 +-
 services/api/app/models/arvados_model.rb           |   6 -
 .../20141208174553_descriptions_are_strings.rb     |   2 +-
 .../api/db/migrate/20141208185217_search_index.rb  |  16 +--
 services/api/db/structure.sql                      | 154 +--------------------
 5 files changed, 10 insertions(+), 170 deletions(-)

       via  164ebe21b6dfa0de9db6cc450dd65ce734c43e21 (commit)
       via  46c6882969833a640c877a958921d25b36bf4dfd (commit)
       via  8714664ec145da92155e0554025491f57b393f28 (commit)
       via  67414a0a471a8046dac310c9a924ae6c0ce674c8 (commit)
      from  b6f73f7acffa9b2f37c78826ff6cee89987a7edc (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 164ebe21b6dfa0de9db6cc450dd65ce734c43e21
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jan 5 10:34:01 2015 -0500

    4523: Do not search :text fields at all.

diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index fc46337..d994733 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -62,12 +62,6 @@ class ArvadosModel < ActiveRecord::Base
       case col.type
       when :string
         true
-      when :text
-        if operator == 'ilike'
-          false
-        else
-          true
-        end
       when :datetime, :integer, :boolean
         !textonly_operator
       else

commit 46c6882969833a640c877a958921d25b36bf4dfd
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jan 5 10:31:15 2015 -0500

    4523: Simplify migration.

diff --git a/services/api/db/migrate/20141208185217_search_index.rb b/services/api/db/migrate/20141208185217_search_index.rb
index f11a37c..9d2616a 100644
--- a/services/api/db/migrate/20141208185217_search_index.rb
+++ b/services/api/db/migrate/20141208185217_search_index.rb
@@ -24,21 +24,9 @@ class SearchIndex < ActiveRecord::Migration
     }
   end
 
-  def up
+  def change
     tables_with_searchable_columns.each do |table, columns|
-      add_index(table.to_sym, columns, name: "#{table}_search_index")
-    end
-  end
-
-  def down
-    tables_with_searchable_columns.each do |table, columns|
-      indexes = ActiveRecord::Base.connection.indexes(table)
-      search_index = indexes.select do |index|
-        index.name == "#{table}_search_index"
-      end
-      if !search_index.empty?
-        remove_index(table.to_sym, name: "#{table}_search_index")
-      end
+      add_index table.to_sym, columns, name: "#{table}_search_index"
     end
   end
 end

commit 8714664ec145da92155e0554025491f57b393f28
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jan 5 10:30:58 2015 -0500

    4523: Increase string length limit. (Postgres allows nearly 1MiB here, no need for a smaller limit.)

diff --git a/services/api/db/migrate/20141208174553_descriptions_are_strings.rb b/services/api/db/migrate/20141208174553_descriptions_are_strings.rb
index 9c7633f..412b427 100644
--- a/services/api/db/migrate/20141208174553_descriptions_are_strings.rb
+++ b/services/api/db/migrate/20141208174553_descriptions_are_strings.rb
@@ -5,7 +5,7 @@ class DescriptionsAreStrings < ActiveRecord::Migration
 
   def up
     tables_with_description_column.each do |table|
-      change_column table.to_sym, :description, :string, :limit => 10000
+      change_column table.to_sym, :description, :string, :limit => 2**19
     end
   end
 
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 6f2971f..524ff8a 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -167,7 +167,7 @@ CREATE TABLE collections (
     uuid character varying(255),
     manifest_text text,
     name character varying(255),
-    description character varying(10000),
+    description character varying(524288),
     properties text,
     expires_at date
 );
@@ -272,7 +272,7 @@ CREATE TABLE groups (
     modified_by_user_uuid character varying(255),
     modified_at timestamp without time zone,
     name character varying(255) NOT NULL,
-    description character varying(10000),
+    description character varying(524288),
     updated_at timestamp without time zone NOT NULL,
     group_class character varying(255)
 );
@@ -431,7 +431,7 @@ CREATE TABLE jobs (
     supplied_script_version character varying(255),
     docker_image_locator character varying(255),
     priority integer DEFAULT 0 NOT NULL,
-    description character varying(10000),
+    description character varying(524288),
     state character varying(255),
     arvados_sdk_version character varying(255)
 );
@@ -685,9 +685,9 @@ CREATE TABLE pipeline_instances (
     properties text,
     state character varying(255),
     components_summary text,
-    description character varying(10000),
     started_at timestamp without time zone,
-    finished_at timestamp without time zone
+    finished_at timestamp without time zone,
+    description character varying(524288)
 );
 
 
@@ -725,7 +725,7 @@ CREATE TABLE pipeline_templates (
     name character varying(255),
     components text,
     updated_at timestamp without time zone NOT NULL,
-    description character varying(10000)
+    description character varying(524288)
 );
 
 
@@ -1279,27 +1279,6 @@ ALTER TABLE ONLY virtual_machines
 
 
 --
--- Name: api_client_authorizations_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX api_client_authorizations_search_index ON api_client_authorizations USING btree (api_token, created_by_ip_address, last_used_by_ip_address, default_owner_uuid);
-
-
---
--- Name: api_clients_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX api_clients_search_index ON api_clients USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, url_prefix);
-
-
---
--- Name: authorized_keys_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX authorized_keys_search_index ON authorized_keys USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, key_type, authorized_user_uuid);
-
-
---
 -- Name: collection_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -1307,13 +1286,6 @@ CREATE UNIQUE INDEX collection_owner_uuid_name_unique ON collections USING btree
 
 
 --
--- Name: collections_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX collections_search_index ON collections USING btree (owner_uuid, modified_by_client_uuid, modified_by_user_uuid, portable_data_hash, redundancy_confirmed_by_client_uuid, uuid, name, description);
-
-
---
 -- Name: groups_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -1321,20 +1293,6 @@ CREATE UNIQUE INDEX groups_owner_uuid_name_unique ON groups USING btree (owner_u
 
 
 --
--- Name: groups_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX groups_search_index ON groups USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, description, group_class);
-
-
---
--- Name: humans_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX humans_search_index ON humans USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid);
-
-
---
 -- Name: index_api_client_authorizations_on_api_client_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -1979,41 +1937,6 @@ CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON virtual_machines USING btr
 
 
 --
--- Name: job_tasks_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX job_tasks_search_index ON job_tasks USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, job_uuid, created_by_job_task_uuid);
-
-
---
--- Name: jobs_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX jobs_search_index ON jobs USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, submit_id, script, script_version, cancelled_by_client_uuid, cancelled_by_user_uuid, output, is_locked_by_uuid, log, repository, supplied_script_version, docker_image_locator, description, state, arvados_sdk_version);
-
-
---
--- Name: keep_disks_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX keep_disks_search_index ON keep_disks USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, ping_secret, node_uuid, filesystem_uuid, keep_service_uuid);
-
-
---
--- Name: keep_services_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX keep_services_search_index ON keep_services USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, service_host, service_type);
-
-
---
--- Name: links_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX links_search_index ON links USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, tail_uuid, link_class, name, head_uuid);
-
-
---
 -- Name: links_tail_name_unique_if_link_class_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -2021,27 +1944,6 @@ CREATE UNIQUE INDEX links_tail_name_unique_if_link_class_name ON links USING btr
 
 
 --
--- Name: logs_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX logs_search_index ON logs USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, object_uuid, event_type, object_owner_uuid);
-
-
---
--- Name: nodes_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX nodes_search_index ON nodes USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname, domain, ip_address, job_uuid);
-
-
---
--- Name: pipeline_instances_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX pipeline_instances_search_index ON pipeline_instances USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, pipeline_template_uuid, name, state, description);
-
-
---
 -- Name: pipeline_template_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -2049,34 +1951,6 @@ CREATE UNIQUE INDEX pipeline_template_owner_uuid_name_unique ON pipeline_templat
 
 
 --
--- Name: pipeline_templates_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX pipeline_templates_search_index ON pipeline_templates USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, description);
-
-
---
--- Name: repositories_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX repositories_search_index ON repositories USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, fetch_url, push_url);
-
-
---
--- Name: specimens_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX specimens_search_index ON specimens USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, material);
-
-
---
--- Name: traits_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX traits_search_index ON traits USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
-
-
---
 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: 
 --
 
@@ -2084,20 +1958,6 @@ CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (v
 
 
 --
--- Name: users_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX users_search_index ON users USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, email, first_name, last_name, identity_url, default_owner_uuid);
-
-
---
--- Name: virtual_machines_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE INDEX virtual_machines_search_index ON virtual_machines USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname);
-
-
---
 -- PostgreSQL database dump complete
 --
 
@@ -2310,5 +2170,3 @@ INSERT INTO schema_migrations (version) VALUES ('20141111133038');
 INSERT INTO schema_migrations (version) VALUES ('20141208164553');
 
 INSERT INTO schema_migrations (version) VALUES ('20141208174553');
-
-INSERT INTO schema_migrations (version) VALUES ('20141208185217');
\ No newline at end of file

commit 67414a0a471a8046dac310c9a924ae6c0ce674c8
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jan 5 10:29:44 2015 -0500

    4523: Description is not unsearchable after all.

diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 0d5c747..260d3ed 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -443,7 +443,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     ['admin', nil, 40, 200],
     ['admin', 'FUSE project', 1, 1],
     ['admin', 'pipeline_10', 2, 2],
-    ['active', 'containing at least two', 0, 0],    # component description is not a searchable column
+    ['active', 'containing at least two', 2, 100],    # component description
     ['active', nil, 10, 100],
     ['active', 'no such match', 0, 0],
   ].each do |user, search_filter, expected_min, expected_max|

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list