[ARVADOS] updated: b4d7d4a3144a84ac2332b94fb12047cb57dcc572

git at public.curoverse.com git at public.curoverse.com
Tue Sep 16 22:36:20 EDT 2014


Summary of changes:
 apps/workbench/config/application.default.yml      |  56 +++++----
 apps/workbench/config/database.yml                 |   7 ++
 apps/workbench/test/diagnostics/pipeline_test.rb   |  65 +++++------
 apps/workbench/test/diagnostics_test_helper.rb     |  16 ++-
 .../test/integration/pipeline_instances_test.rb    |   9 +-
 apps/workbench/test/test_helper.rb                 |   2 +-
 docker/java-bwa-samtools/Dockerfile                |   5 +-
 sdk/cli/bin/arv-run-pipeline-instance              |   4 +-
 sdk/python/arvados/collection.py                   |  10 +-
 sdk/python/arvados/keep.py                         | 130 +++++++++++----------
 services/api/script/crunch-dispatch.rb             |  60 +++++-----
 services/api/test/fixtures/pipeline_instances.yml  |   8 --
 services/fuse/arvados_fuse/__init__.py             |  18 ++-
 13 files changed, 206 insertions(+), 184 deletions(-)

       via  b4d7d4a3144a84ac2332b94fb12047cb57dcc572 (commit)
       via  787c47f7e1b2e9cdc4236c3052e34125259feb7f (commit)
       via  452baf1ec1b55c6c4613972ee5f6b5ebf28e8ed7 (commit)
       via  ec3e655812817f4d7935629f397d0508f961bd9e (commit)
       via  869c692dfabba2ade6db0fea518e1fed8d2b8a53 (commit)
       via  63af4052e2899a275930678bda65d82e857e1a39 (commit)
       via  a6f8d9e254b27305f8f61adc04b685206531237e (commit)
       via  91fe76f4a3f8e5f59d12343ae69d2ba5a43d8e55 (commit)
       via  1245c7955eefc1bb4171d7d80dd6f0cac1f0676a (commit)
       via  19ba184b0a37d93b5ef5679be8bcc72417887d62 (commit)
       via  46ad2015c1db3662a1ece565df06acbbfd7ee7ec (commit)
       via  facb6375180b37b628c417e97a181abe71e3181c (commit)
       via  46f5403fdd2b3b0bd26d81d81ba509c624f54bb3 (commit)
       via  1065f68b84a650980cbcc1e0dd51b587d075f06b (commit)
      from  6d5e04a731edc9ce8944ecea637070afbdadeb05 (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 b4d7d4a3144a84ac2332b94fb12047cb57dcc572
Merge: 787c47f 452baf1
Author: radhika <radhika at curoverse.com>
Date:   Tue Sep 16 22:36:08 2014 -0400

    Merge branch 'master' into 2761-diagnostic-suite


commit 787c47f7e1b2e9cdc4236c3052e34125259feb7f
Author: radhika <radhika at curoverse.com>
Date:   Tue Sep 16 22:35:12 2014 -0400

    2761: minor updates to diagnostics test config explanation.

diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 22ed3a3..e43d94b 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -15,7 +15,7 @@
 #   max_wait_seconds: max time in seconds to wait for the pipeline run to complete.
 #     Default value of 30 seconds is used when this value is not provided.
 diagnostics:
-  arvados_workbench_url: https://localhost:3000/
+  arvados_workbench_url: https://localhost:3000
   user_tokens:
     active: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
   pipelines_to_test:
diff --git a/apps/workbench/test/diagnostics_test_helper.rb b/apps/workbench/test/diagnostics_test_helper.rb
index 55821ed..392e7d0 100644
--- a/apps/workbench/test/diagnostics_test_helper.rb
+++ b/apps/workbench/test/diagnostics_test_helper.rb
@@ -1,14 +1,19 @@
 require 'integration_helper'
 require 'yaml'
 
+# Diagnostics tests are executed when "RAILS_ENV=diagnostics" is used.
+# When "RAILS_ENV=test" is used, tests in the "diagnostics" directory
+# will not be executed.
+
 class DiagnosticsTest < ActionDispatch::IntegrationTest
 
   def visit_page_with_token token_name, path='/'
-    if !path.start_with? Rails.configuration.arvados_workbench_url
-      path = Rails.configuration.arvados_workbench_url + path
+    workbench_url = Rails.configuration.arvados_workbench_url
+    if workbench_url.end_with? '/'
+      workbench_url = workbench_url[0, workbench_url.size-1]
     end
     tokens = Rails.configuration.user_tokens
-    visit page_with_token(tokens[token_name], path)
+    visit page_with_token(tokens[token_name], (workbench_url + path))
   end
 
   def wait_until_page_has text_to_look_for, max_time=30

commit ec3e655812817f4d7935629f397d0508f961bd9e
Merge: 869c692 63af405
Author: radhika <radhika at curoverse.com>
Date:   Tue Sep 16 18:40:57 2014 -0400

    Merge branch 'master' into 2761-diagnostic-suite


commit 869c692dfabba2ade6db0fea518e1fed8d2b8a53
Author: radhika <radhika at curoverse.com>
Date:   Tue Sep 16 18:40:43 2014 -0400

    2761: update config

diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 1a6bd02..22ed3a3 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -1,6 +1,32 @@
 # Do not use this file for site configuration. Create application.yml
 # instead (see application.yml.example).
 
+# Below is a sample setting for diagnostics testing.
+# Configure workbench URL as "arvados_workbench_url"
+# Configure test user tokens as "user_tokens".
+#   At this time the tests need an "active" user token.
+# Also, configure the pipelines to be executed as "pipelines_to_test".
+# For each of the pipelines identified by the name of your choice
+#     ("pipeline_1" and "pipeline_2" in this sample), provide the following:
+#   template_uuid: is the uuid of the template to be executed
+#   input_paths: an array of inputs for the pipeline. Use either a collection's "uuid"
+#     or a file's "uuid/file_name" path in this array. If the pipeline does not require
+#     any inputs, this can be omitted. 
+#   max_wait_seconds: max time in seconds to wait for the pipeline run to complete.
+#     Default value of 30 seconds is used when this value is not provided.
+diagnostics:
+  arvados_workbench_url: https://localhost:3000/
+  user_tokens:
+    active: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
+  pipelines_to_test:
+    pipeline_1:
+      template_uuid: zzzzz-p5p6p-rxj8d71854j9idn
+      input_paths: [zzzzz-4zz18-nz98douzhaa3jh2]
+      max_wait_seconds: 10
+    pipeline_2:
+      template_uuid: zzzzz-p5p6p-1xbobfobk94ppbv
+      input_paths: [zzzzz-4zz18-nz98douzhaa3jh2, zzzzz-4zz18-gpw9o5wpcti3nib]
+
 development:
   cache_classes: false
   eager_load: true
@@ -142,36 +168,5 @@ common:
   issue_reporter_email_to: arvados at example.com
   support_email_address: arvados at example.com
 
-#  # Configuration for diagnostics testing. See the "diagnostics" section for more explanation.
-#  arvados_workbench_url: false
-#  diagnostics_testing_user_tokens: false
-#  diagnostics_testing_pipeline_fields: false
-
   # filename suffixes for which view icon would be shown in collection show page
   filename_suffixes_with_view_icon: [txt, gif, jpeg, jpg, png, html, htm, pdf]
-
-# Below is a sample setting for diagnostics testing.
-# Configure test user tokens as "diagnostics_testing_user_tokens".
-#   At this time the tests need an "active" user token.
-# Also, configure the pipelines to be executed as "diagnostics_testing_pipeline_fields".
-# For each of the pipelines identified by the name of your choice
-#     ("tutorial pipeline" and "tutorial pipeline 2" in this sample):
-#   template_uuid: is the uuid of the template to be executed
-#   input_paths: an array of inputs for the pipeline. Use either a collection's "uuid"
-#     or a file's "uuid/file_name" path in this array. If the pipeline does not require
-#     any inputs, this can be omitted. 
-#   max_wait_seconds: max time in seconds to wait for the pipeline run to complete.
-#     Default value of 30 seconds is used when this value is not provided.
-
-diagnostics:
-  arvados_workbench_url: https://localhost:3000/
-  diagnostics_testing_user_tokens:
-    active: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
-  diagnostics_testing_pipeline_fields:
-    tutorial pipeline 1:
-      template_uuid: zzzzz-p5p6p-rxj8d71854j9idn
-      input_paths: [zzzzz-4zz18-nz98douzhaa3jh2]
-      max_wait_seconds: 10
-    tutorial pipeline 2:
-      template_uuid: zzzzz-p5p6p-1xbobfobk94ppbv
-      input_paths: [zzzzz-4zz18-nz98douzhaa3jh2, zzzzz-4zz18-gpw9o5wpcti3nib]
diff --git a/apps/workbench/config/database.yml b/apps/workbench/config/database.yml
index 188ca37..dd7669c 100644
--- a/apps/workbench/config/database.yml
+++ b/apps/workbench/config/database.yml
@@ -24,9 +24,9 @@ production:
   pool: 5
   timeout: 5000
 
+# Note: The "diagnostics" database configuration is not actually used.
 diagnostics:
   adapter: sqlite3
   database: db/diagnostics.sqlite3
   pool: 5
   timeout: 5000
-
diff --git a/apps/workbench/test/diagnostics/pipeline_test.rb b/apps/workbench/test/diagnostics/pipeline_test.rb
index 95396c2..a52d1a6 100644
--- a/apps/workbench/test/diagnostics/pipeline_test.rb
+++ b/apps/workbench/test/diagnostics/pipeline_test.rb
@@ -3,18 +3,18 @@ require 'selenium-webdriver'
 require 'headless'
 
 class PipelineTest < DiagnosticsTest
-  pipelines_to_run = Rails.configuration.diagnostics_testing_pipeline_fields.andand.keys
+  pipelines_to_test = Rails.configuration.pipelines_to_test.andand.keys
 
   setup do
-#    headless = Headless.new
-#    headless.start
+    headless = Headless.new
+    headless.start
     Capybara.current_driver = :selenium
   end
 
-  pipelines_to_run.andand.each do |pipeline_to_run|
-    test "visit home page for user #{pipeline_to_run}" do
+  pipelines_to_test.andand.each do |pipeline_to_test|
+    test "visit home page for user #{pipeline_to_test}" do
       visit_page_with_token 'active'
-      pipeline_config = Rails.configuration.diagnostics_testing_pipeline_fields[pipeline_to_run]
+      pipeline_config = Rails.configuration.pipelines_to_test[pipeline_to_test]
 
       # Search for tutorial template
       within('.navbar-fixed-top') do
@@ -75,7 +75,7 @@ class PipelineTest < DiagnosticsTest
              
       page.all('.selectable').first.click
       wait_for_ajax
-      # it appears that ajax reload is wiping out input selection after search results; so, select one more time.
+      # ajax reload is wiping out input selection after search results; so, select again.
       page.all('.selectable').first.click
       wait_for_ajax
 
diff --git a/apps/workbench/test/diagnostics_test_helper.rb b/apps/workbench/test/diagnostics_test_helper.rb
index ad2e737..55821ed 100644
--- a/apps/workbench/test/diagnostics_test_helper.rb
+++ b/apps/workbench/test/diagnostics_test_helper.rb
@@ -7,7 +7,7 @@ class DiagnosticsTest < ActionDispatch::IntegrationTest
     if !path.start_with? Rails.configuration.arvados_workbench_url
       path = Rails.configuration.arvados_workbench_url + path
     end
-    tokens = Rails.configuration.diagnostics_testing_user_tokens
+    tokens = Rails.configuration.user_tokens
     visit page_with_token(tokens[token_name], path)
   end
 
diff --git a/apps/workbench/test/test_helper.rb b/apps/workbench/test/test_helper.rb
index 7f23988..f7cf87f 100644
--- a/apps/workbench/test/test_helper.rb
+++ b/apps/workbench/test/test_helper.rb
@@ -1,4 +1,4 @@
-ENV["RAILS_ENV"] = "test" if !ENV["RAILS_ENV"]
+ENV["RAILS_ENV"] = "test" if (ENV["RAILS_ENV"] != "diagnostics")
 
 unless ENV["NO_COVERAGE_TEST"]
   begin

commit 1245c7955eefc1bb4171d7d80dd6f0cac1f0676a
Author: radhika <radhika at curoverse.com>
Date:   Tue Sep 16 16:55:22 2014 -0400

    2761: add diagnostics section to config

diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index c097ea3..1a6bd02 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -142,35 +142,36 @@ common:
   issue_reporter_email_to: arvados at example.com
   support_email_address: arvados at example.com
 
-  # Configuration for diagnostics testing. Use this to enable diagnostics testing for an env.
-  diagnostics_testing_user_tokens: false
-  diagnostics_testing_pipeline_fields: false
-
-  # Below is a sample setting for diagnostics testing.
-  # Configure test user tokens as "diagnostics_testing_user_tokens".
-  #   At this time the tests need an "active" user token.
-  # Also, configure the pipelines to be executed as "diagnostics_testing_pipeline_fields".
-  # For each of the pipelines identified by the name of your choice
-  #     ("tutorial pipeline" and "tutorial pipeline 2" in this sample):
-  #   template_uuid: is the uuid of the template to be executed
-  #   input_paths: an array of inputs for the pipeline. Use either a collection's "uuid"
-  #     or a file's "uuid/file_name" path in this array. If the pipeline does not require
-  #     any inputs, this can be omitted. 
-  #   max_wait_seconds: max time in seconds to wait for the pipeline run to complete.
-  #     Default value of 30 seconds is used when this value is not provided.
-  #diagnostics_testing_user_tokens:
-  #  active: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
-  #diagnostics_testing_pipeline_fields:
-  #  pipeline with collection input:
-  #    template_uuid: 4xphq-p5p6p-gsw68qb7owx1q2h
-  #    input_paths: [qr1hi-4zz18-n1o4i1j5fvz6npu]
-  #    max_wait_seconds: 100
-  #  pipeline with file as input:
-  #    template_uuid: 4xphq-p5p6p-gsw68qb7owx1q2h
-  #    input_paths: [440e201c0141cb8a551b61fd7d07d2a1+83/qr1hi-8i9sb-j2tp8q1m2uf6a1o.log.txt]
-  #    max_wait_seconds: 200
-  #  pipeline with no inputs:
-  #    template_uuid: 4xphq-p5p6p-gsw68qb7owx1q2h
+#  # Configuration for diagnostics testing. See the "diagnostics" section for more explanation.
+#  arvados_workbench_url: false
+#  diagnostics_testing_user_tokens: false
+#  diagnostics_testing_pipeline_fields: false
 
   # filename suffixes for which view icon would be shown in collection show page
   filename_suffixes_with_view_icon: [txt, gif, jpeg, jpg, png, html, htm, pdf]
+
+# Below is a sample setting for diagnostics testing.
+# Configure test user tokens as "diagnostics_testing_user_tokens".
+#   At this time the tests need an "active" user token.
+# Also, configure the pipelines to be executed as "diagnostics_testing_pipeline_fields".
+# For each of the pipelines identified by the name of your choice
+#     ("tutorial pipeline" and "tutorial pipeline 2" in this sample):
+#   template_uuid: is the uuid of the template to be executed
+#   input_paths: an array of inputs for the pipeline. Use either a collection's "uuid"
+#     or a file's "uuid/file_name" path in this array. If the pipeline does not require
+#     any inputs, this can be omitted. 
+#   max_wait_seconds: max time in seconds to wait for the pipeline run to complete.
+#     Default value of 30 seconds is used when this value is not provided.
+
+diagnostics:
+  arvados_workbench_url: https://localhost:3000/
+  diagnostics_testing_user_tokens:
+    active: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
+  diagnostics_testing_pipeline_fields:
+    tutorial pipeline 1:
+      template_uuid: zzzzz-p5p6p-rxj8d71854j9idn
+      input_paths: [zzzzz-4zz18-nz98douzhaa3jh2]
+      max_wait_seconds: 10
+    tutorial pipeline 2:
+      template_uuid: zzzzz-p5p6p-1xbobfobk94ppbv
+      input_paths: [zzzzz-4zz18-nz98douzhaa3jh2, zzzzz-4zz18-gpw9o5wpcti3nib]
diff --git a/apps/workbench/config/database.yml b/apps/workbench/config/database.yml
index 51a4dd4..188ca37 100644
--- a/apps/workbench/config/database.yml
+++ b/apps/workbench/config/database.yml
@@ -23,3 +23,10 @@ production:
   database: db/production.sqlite3
   pool: 5
   timeout: 5000
+
+diagnostics:
+  adapter: sqlite3
+  database: db/diagnostics.sqlite3
+  pool: 5
+  timeout: 5000
+
diff --git a/apps/workbench/test/diagnostics/pipeline_test.rb b/apps/workbench/test/diagnostics/pipeline_test.rb
index bd8ded6..95396c2 100644
--- a/apps/workbench/test/diagnostics/pipeline_test.rb
+++ b/apps/workbench/test/diagnostics/pipeline_test.rb
@@ -6,16 +6,15 @@ class PipelineTest < DiagnosticsTest
   pipelines_to_run = Rails.configuration.diagnostics_testing_pipeline_fields.andand.keys
 
   setup do
-    headless = Headless.new
-    headless.start
+#    headless = Headless.new
+#    headless.start
     Capybara.current_driver = :selenium
   end
 
   pipelines_to_run.andand.each do |pipeline_to_run|
     test "visit home page for user #{pipeline_to_run}" do
       visit_page_with_token 'active'
-
-      pipeline_config = diagnostic_test_pipeline_config pipeline_to_run
+      pipeline_config = Rails.configuration.diagnostics_testing_pipeline_fields[pipeline_to_run]
 
       # Search for tutorial template
       within('.navbar-fixed-top') do
@@ -36,7 +35,7 @@ class PipelineTest < DiagnosticsTest
 
       # Choose input for the pipeline
       pipeline_config['input_paths'].each do |look_for|
-        select_inut look_for
+        select_input look_for
       end
       wait_for_ajax
 
@@ -51,43 +50,43 @@ class PipelineTest < DiagnosticsTest
     end
   end
 
-  def select_inut look_for
+  def select_input look_for
     inputs_needed = page.all('.btn', text: 'Choose')
     return if (!inputs_needed || !inputs_needed.any?)
 
-    inputs_needed[0].click
-    within('.modal-dialog') do
-      look_for_uuid = nil
-      look_for_file = nil
-
-      if look_for.andand.index('/').andand.>0
-        partitions = look_for.partition('/')
-        look_for_uuid = partitions[0]
-        look_for_file = partitions[2]
+    look_for_uuid = nil
+    look_for_file = nil
+    if look_for.andand.index('/').andand.>0
+      partitions = look_for.partition('/')
+      look_for_uuid = partitions[0]
+      look_for_file = partitions[2]
     else
       look_for_uuid = look_for
       look_for_file = nil
     end
 
-    if look_for_uuid
-      fill_in('Search', with: look_for_uuid, exact: true)
-    end
-           
-    wait_for_ajax
-    page.all('.selectable').first.click
-    wait_for_ajax
-    # it appears that ajax reload is wiping out input selection after search results; so, select one more time.
-    page.all('.selectable').first.click
-    wait_for_ajax
-
-    if look_for_file
+    inputs_needed[0].click
+
+    within('.modal-dialog') do
+      if look_for_uuid
+        fill_in('Search', with: look_for_uuid, exact: true)
+        wait_for_ajax
+      end
+             
+      page.all('.selectable').first.click
       wait_for_ajax
-      within('.collection_files_name', text: look_for_file) do
-        find('.fa-file').click
+      # it appears that ajax reload is wiping out input selection after search results; so, select one more time.
+      page.all('.selectable').first.click
+      wait_for_ajax
+
+      if look_for_file
+        wait_for_ajax
+        within('.collection_files_name', text: look_for_file) do
+          find('.fa-file').click
+        end
       end
-    end
-    
-    find('button', text: 'OK').click
+      
+      find('button', text: 'OK').click
       wait_for_ajax
     end
   end
diff --git a/apps/workbench/test/diagnostics_test_helper.rb b/apps/workbench/test/diagnostics_test_helper.rb
index a78bf66..ad2e737 100644
--- a/apps/workbench/test/diagnostics_test_helper.rb
+++ b/apps/workbench/test/diagnostics_test_helper.rb
@@ -4,14 +4,13 @@ require 'yaml'
 class DiagnosticsTest < ActionDispatch::IntegrationTest
 
   def visit_page_with_token token_name, path='/'
+    if !path.start_with? Rails.configuration.arvados_workbench_url
+      path = Rails.configuration.arvados_workbench_url + path
+    end
     tokens = Rails.configuration.diagnostics_testing_user_tokens
     visit page_with_token(tokens[token_name], path)
   end
 
-  def diagnostic_test_pipeline_config pipeline_to_run
-    Rails.configuration.diagnostics_testing_pipeline_fields[pipeline_to_run]
-  end
-
   def wait_until_page_has text_to_look_for, max_time=30
     max_time = 30 if (!max_time || (max_time.to_s != max_time.to_i.to_s))
     Timeout.timeout(max_time) do

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list