[ARVADOS] updated: 6122bbc7a1c48e8bded0ace61be5786ea398651f

Git user git at public.curoverse.com
Mon Mar 14 15:34:30 EDT 2016


Summary of changes:
 services/api/Rakefile                              | 34 ++++++++++++----------
 .../arvados/v1/repositories_controller_test.rb     |  1 -
 2 files changed, 18 insertions(+), 17 deletions(-)

  discards  802401710776e8efe1c7d7856b6e87d99fda178d (commit)
       via  6122bbc7a1c48e8bded0ace61be5786ea398651f (commit)
       via  0d4eeea43fdc67be95e5b45022db3a6234df5f40 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (802401710776e8efe1c7d7856b6e87d99fda178d)
            \
             N -- N -- N (6122bbc7a1c48e8bded0ace61be5786ea398651f)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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 6122bbc7a1c48e8bded0ace61be5786ea398651f
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Mar 14 15:34:07 2016 -0400

    5737: Back out Rakefile stuff

diff --git a/services/api/Rakefile b/services/api/Rakefile
index fbbf53e..65cd4b3 100644
--- a/services/api/Rakefile
+++ b/services/api/Rakefile
@@ -12,23 +12,25 @@ end
 
 Server::Application.load_tasks
 
-namespace :test do
-  task(:run).clear
-  # Copied from the definition in Rails 3.2.
-  # This may need to be updated if we upgrade Rails.
-  task :run do
-    errors = %w(test:units test:functionals test:integration test:tasks).collect do |task|
-      begin
-        Rake::Task[task].invoke
-        nil
-      rescue => e
-        { :task => task, :exception => e }
-      end
-    end.compact
+if false
+  namespace :test do
+    task(:run).clear
+    # Copied from the definition in Rails 3.2.
+    # This may need to be updated if we upgrade Rails.
+    task :run do
+      errors = %w(test:units test:functionals test:integration test:tasks).collect do |task|
+        begin
+          Rake::Task[task].invoke
+          nil
+        rescue => e
+          { :task => task, :exception => e }
+        end
+      end.compact
 
-    if errors.any?
-      puts errors.map { |e| "Errors running #{e[:task]}! #{e[:exception].inspect}" }.join("\n")
-      abort
+      if errors.any?
+        puts errors.map { |e| "Errors running #{e[:task]}! #{e[:exception].inspect}" }.join("\n")
+        abort
+      end
     end
   end
 end

commit 0d4eeea43fdc67be95e5b45022db3a6234df5f40
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Mar 14 15:31:44 2016 -0400

    5737: More Ruby 2.2 compat fixes

diff --git a/services/api/Gemfile b/services/api/Gemfile
index 43d0b67..efc0cad 100644
--- a/services/api/Gemfile
+++ b/services/api/Gemfile
@@ -9,7 +9,7 @@ group :test, :development do
   gem 'factory_girl_rails'
   gem 'database_cleaner'
   gem 'ruby-prof'
-  gem 'minitest', '~> 5.0'
+  gem 'test-unit', '~> 3.0'
   # Note: "require: false" here tells bunder not to automatically
   # 'require' the packages during application startup. Installation is
   # still mandatory.
@@ -32,7 +32,7 @@ gem 'oj'
 # Gems used only for assets and not required
 # in production environments by default.
 group :assets do
-  gem 'sass-rails',   '>= 3.2'
+  gem 'sass-rails',   '~> 3.2'
   gem 'coffee-rails', '~> 3.2'
 
   # See https://github.com/sstephenson/execjs#readme for more supported runtimes
@@ -61,8 +61,8 @@ gem 'acts_as_api'
 
 gem 'passenger'
 
-gem 'omniauth', '1.1.1'
-gem 'omniauth-oauth2', '1.1.1'
+gem 'omniauth', '~> 1.1.1'
+gem 'omniauth-oauth2', '~> 1.1.1'
 
 gem 'andand'
 
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index 9854111..2599027 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -95,7 +95,7 @@ GEM
       multi_json (>= 1.0.0)
       signet (~> 0.4.5)
       uuidtools (>= 2.1.0)
-    hashie (1.2.0)
+    hashie (2.1.2)
     highline (1.7.8)
     hike (1.2.3)
     httpauth (0.2.1)
@@ -115,7 +115,6 @@ GEM
       treetop (~> 1.4.8)
     metaclass (0.0.4)
     mime-types (1.25.1)
-    minitest (5.8.4)
     mocha (1.1.0)
       metaclass (~> 0.0.1)
     multi_json (1.11.2)
@@ -134,8 +133,8 @@ GEM
       multi_json (~> 1.0)
       rack (~> 1.2)
     oj (2.14.6)
-    omniauth (1.1.1)
-      hashie (~> 1.2)
+    omniauth (1.1.4)
+      hashie (>= 1.2, < 3)
       rack
     omniauth-oauth2 (1.1.1)
       oauth2 (~> 0.8.0)
@@ -148,6 +147,7 @@ GEM
       pg
       rails (~> 3.1)
     polyglot (0.3.5)
+    power_assert (0.2.7)
     puma (3.1.0)
     rack (1.4.7)
     rack-cache (1.6.1)
@@ -171,7 +171,7 @@ GEM
       rake (>= 0.8.7)
       rdoc (~> 3.4)
       thor (>= 0.14.6, < 2.0)
-    rake (11.0.1)
+    rake (11.1.1)
     rdoc (3.12.2)
       json (~> 1.4)
     ref (2.0.0)
@@ -200,6 +200,8 @@ GEM
       rack (~> 1.0)
       tilt (~> 1.1, != 1.3.0)
     sshkey (1.8.0)
+    test-unit (3.1.7)
+      power_assert
     test_after_commit (1.0.0)
       activerecord (>= 3.2)
     themes_for_rails (0.5.1)
@@ -236,12 +238,11 @@ DEPENDENCIES
   faye-websocket
   google-api-client (~> 0.6.3)
   jquery-rails
-  minitest (~> 5.0)
   mocha
   multi_json
   oj
-  omniauth (= 1.1.1)
-  omniauth-oauth2 (= 1.1.1)
+  omniauth (~> 1.1.1)
+  omniauth-oauth2 (~> 1.1.1)
   passenger
   pg
   pg_power
@@ -249,10 +250,11 @@ DEPENDENCIES
   rails (~> 3.2)
   ruby-prof
   rvm-capistrano
-  sass-rails (>= 3.2)
+  sass-rails (~> 3.2)
   simplecov (~> 0.7.1)
   simplecov-rcov
   sshkey
+  test-unit (~> 3.0)
   test_after_commit
   themes_for_rails
   therubyracer
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index f1e7b4f..cd2bd74 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -41,6 +41,11 @@ class Collection < ArvadosModel
                 )
   end
 
+  def initialize *args
+    super
+    @signatures_checked = false
+  end
+
   FILE_TOKEN = /^[[:digit:]]+:[[:digit:]]+:/
   def check_signatures
     return false if self.manifest_text.nil?
diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index 6c24293..b65f70b 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -387,26 +387,8 @@ class Job < ArvadosModel
   end
 
   def ensure_no_collection_uuids_in_script_params
-    # recursive_hash_search searches recursively through hashes and
-    # arrays in 'thing' for string fields matching regular expression
-    # 'pattern'.  Returns true if pattern is found, false otherwise.
-    def recursive_hash_search thing, pattern
-      if thing.is_a? Hash
-        thing.each do |k, v|
-          return true if recursive_hash_search v, pattern
-        end
-      elsif thing.is_a? Array
-        thing.each do |k|
-          return true if recursive_hash_search k, pattern
-        end
-      elsif thing.is_a? String
-        return true if thing.match pattern
-      end
-      false
-    end
-
-    # Fail validation if any script_parameters field includes a string containing a
-    # collection uuid pattern.
+    # Fail validation if any script_parameters field includes a string
+    # containing a collection uuid pattern.
     if self.script_parameters_changed?
       if recursive_hash_search(self.script_parameters, Collection.uuid_regex)
         self.errors.add :script_parameters, "must use portable_data_hash instead of collection uuid"
@@ -415,4 +397,22 @@ class Job < ArvadosModel
     end
     true
   end
+
+  # recursive_hash_search searches recursively through hashes and
+  # arrays in 'thing' for string fields matching regular expression
+  # 'pattern'.  Returns true if pattern is found, false otherwise.
+  def recursive_hash_search thing, pattern
+    if thing.is_a? Hash
+      thing.each do |k, v|
+        return true if recursive_hash_search v, pattern
+      end
+    elsif thing.is_a? Array
+      thing.each do |k|
+        return true if recursive_hash_search k, pattern
+      end
+    elsif thing.is_a? String
+      return true if thing.match pattern
+    end
+    false
+  end
 end
diff --git a/services/api/app/models/node.rb b/services/api/app/models/node.rb
index abb46fd..0b84cdc 100644
--- a/services/api/app/models/node.rb
+++ b/services/api/app/models/node.rb
@@ -222,7 +222,7 @@ class Node < ArvadosModel
     (0..Rails.configuration.max_compute_nodes-1).each do |slot_number|
       hostname = hostname_for_slot(slot_number)
       hostfile = File.join Rails.configuration.dns_server_conf_dir, "#{hostname}.conf"
-      if !File.exists? hostfile
+      if !File.exist? hostfile
         n = Node.where(:slot_number => slot_number).first
         if n.nil? or n.ip_address.nil?
           dns_server_update(hostname, '127.40.4.0')
diff --git a/services/api/config/boot.rb b/services/api/config/boot.rb
index 4489e58..f2830ae 100644
--- a/services/api/config/boot.rb
+++ b/services/api/config/boot.rb
@@ -3,4 +3,4 @@ require 'rubygems'
 # Set up gems listed in the Gemfile.
 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
 
-require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
+require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
diff --git a/services/api/config/initializers/load_config.rb b/services/api/config/initializers/load_config.rb
index de9770d..3a7f962 100644
--- a/services/api/config/initializers/load_config.rb
+++ b/services/api/config/initializers/load_config.rb
@@ -6,7 +6,7 @@ rescue LoadError
   # configured by application.yml (i.e., here!) instead.
 end
 
-if (File.exists?(File.expand_path '../omniauth.rb', __FILE__) and
+if (File.exist?(File.expand_path '../omniauth.rb', __FILE__) and
     not defined? WARNED_OMNIAUTH_CONFIG)
   Rails.logger.warn <<-EOS
 DEPRECATED CONFIGURATION:
@@ -26,7 +26,7 @@ $application_config = {}
 
 %w(application.default application).each do |cfgfile|
   path = "#{::Rails.root.to_s}/config/#{cfgfile}.yml"
-  if File.exists? path
+  if File.exist? path
     yaml = ERB.new(IO.read path).result(binding)
     confs = YAML.load(yaml)
     # Ignore empty YAML file:
diff --git a/services/api/lib/crunch_dispatch.rb b/services/api/lib/crunch_dispatch.rb
index ce94f73..83cd1b9 100644
--- a/services/api/lib/crunch_dispatch.rb
+++ b/services/api/lib/crunch_dispatch.rb
@@ -27,7 +27,7 @@ class CrunchDispatch
     @cgroup_root = ENV['CRUNCH_CGROUP_ROOT']
 
     @arvados_internal = Rails.configuration.git_internal_dir
-    if not File.exists? @arvados_internal
+    if not File.exist? @arvados_internal
       $stderr.puts `mkdir -p #{@arvados_internal.shellescape} && git init --bare #{@arvados_internal.shellescape}`
       raise "No internal git repository available" unless ($? == 0)
     end
diff --git a/services/api/script/arvados-git-sync.rb b/services/api/script/arvados-git-sync.rb
index 3a8ed27..b785534 100755
--- a/services/api/script/arvados-git-sync.rb
+++ b/services/api/script/arvados-git-sync.rb
@@ -22,7 +22,7 @@ DEBUG = 1
 # load and merge in the environment-specific application config info
 # if present, overriding base config parameters as specified
 path = File.absolute_path('../../config/arvados-clients.yml', __FILE__)
-if File.exists?(path) then
+if File.exist?(path) then
   cp_config = YAML.load_file(path)[ENV['RAILS_ENV']]
 else
   puts "Please create a\n #{path}\n file"
@@ -214,7 +214,7 @@ end
 
 begin
   # Get our local gitolite-admin repo up to snuff
-  if not File.exists?(gitolite_admin) then
+  if not File.exist?(gitolite_admin) then
     ensure_directory(gitolite_tmpdir, 0700)
     Dir.chdir(gitolite_tmpdir)
     `git clone #{gitolite_url}`
diff --git a/services/api/script/migrate-gitolite-to-uuid-storage.rb b/services/api/script/migrate-gitolite-to-uuid-storage.rb
index 8db1a0e..169509f 100755
--- a/services/api/script/migrate-gitolite-to-uuid-storage.rb
+++ b/services/api/script/migrate-gitolite-to-uuid-storage.rb
@@ -35,7 +35,7 @@ DEBUG = 1
 # load and merge in the environment-specific application config info
 # if present, overriding base config parameters as specified
 path = File.dirname(__FILE__) + '/config/arvados-clients.yml'
-if File.exists?(path) then
+if File.exist?(path) then
   cp_config = YAML.load_file(path)[ENV['RAILS_ENV']]
 else
   puts "Please create a\n " + File.dirname(__FILE__) + "/config/arvados-clients.yml\n file"
@@ -186,7 +186,7 @@ end
 
 begin
   # Get our local gitolite-admin repo up to snuff
-  if not File.exists?(gitolite_admin) then
+  if not File.exist?(gitolite_admin) then
     ensure_directory(gitolite_tmpdir, 0700)
     Dir.chdir(gitolite_tmpdir)
     `git clone #{gitolite_url}`
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 a8583be..5aa96c8 100644
--- a/services/api/test/functional/arvados/v1/collections_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb
@@ -753,7 +753,7 @@ EOS
   ].each do |description_size, expected_response|
     test "create collection with description size #{description_size}
           and expect response #{expected_response}" do
-      skip "(Descriptions are not part of search indexes. Skip until full-text search
+      omit "(Descriptions are not part of search indexes. Skip until full-text search
             is implemented, at which point replace with a search in description.)"
 
       authorize_with :active
diff --git a/services/api/test/functional/arvados/v1/jobs_controller_test.rb b/services/api/test/functional/arvados/v1/jobs_controller_test.rb
index 1e1425e..e66eb0d 100644
--- a/services/api/test/functional/arvados/v1/jobs_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/jobs_controller_test.rb
@@ -97,7 +97,7 @@ class Arvados::V1::JobsControllerTest < ActionController::TestCase
                  'server should correct bogus cancelled_at ' +
                  job['cancelled_at'])
     assert_equal(true,
-                 File.exists?(Rails.configuration.crunch_refresh_trigger),
+                 File.exist?(Rails.configuration.crunch_refresh_trigger),
                  'trigger file should be created when job is cancelled')
   end
 
diff --git a/services/api/test/functional/arvados/v1/links_controller_test.rb b/services/api/test/functional/arvados/v1/links_controller_test.rb
index 1345701..af3cd3a 100644
--- a/services/api/test/functional/arvados/v1/links_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/links_controller_test.rb
@@ -306,7 +306,7 @@ class Arvados::V1::LinksControllerTest < ActionController::TestCase
   end
 
   test "retrieve all permissions using generic links index api" do
-    skip "(not implemented)"
+    omit "(not implemented)"
     # Links.readable_by() does not return the full set of permission
     # links that are visible to a user (i.e., all permission links
     # whose head_uuid references an object for which the user has
diff --git a/services/api/test/functional/arvados/v1/repositories_controller_test.rb b/services/api/test/functional/arvados/v1/repositories_controller_test.rb
index c709d98..5a5ac4c 100644
--- a/services/api/test/functional/arvados/v1/repositories_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/repositories_controller_test.rb
@@ -215,7 +215,6 @@ class Arvados::V1::RepositoriesControllerTest < ActionController::TestCase
             refute_match expect[:refute], u
           end
         else
-          assert_match expect[:match], u
           assert((r['clone_urls'].any? do |u|
                     expect[:match].match u
                   end),
diff --git a/services/api/test/unit/app_version_test.rb b/services/api/test/unit/app_version_test.rb
index 3e9b167..4718ac2 100644
--- a/services/api/test/unit/app_version_test.rb
+++ b/services/api/test/unit/app_version_test.rb
@@ -29,7 +29,7 @@ class AppVersionTest < ActiveSupport::TestCase
 
   test 'override with file' do
     path = Rails.root.join 'git-commit.version'
-    assert(!File.exists?(path),
+    assert(!File.exist?(path),
            "Packaged version file found in source tree: #{path}")
     begin
       File.open(path, 'w') do |f|
diff --git a/services/api/test/unit/commit_test.rb b/services/api/test/unit/commit_test.rb
index b57c23b..301e071 100644
--- a/services/api/test/unit/commit_test.rb
+++ b/services/api/test/unit/commit_test.rb
@@ -183,34 +183,34 @@ class CommitTest < ActiveSupport::TestCase
     Dir.mktmpdir do |touchdir|
       # invalid input to maximum
       a = Commit.find_commit_range('active/foo', nil, "31ce37fe365b3dc204300a3e4c396ad333ed0556 ; touch #{touchdir}/uh_oh", nil)
-      assert !File.exists?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'maximum' parameter of find_commit_range is exploitable"
+      assert !File.exist?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'maximum' parameter of find_commit_range is exploitable"
       assert_equal [], a
 
       # invalid input to maximum
       a = Commit.find_commit_range('active/foo', nil, "$(uname>#{touchdir}/uh_oh)", nil)
-      assert !File.exists?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'maximum' parameter of find_commit_range is exploitable"
+      assert !File.exist?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'maximum' parameter of find_commit_range is exploitable"
       assert_equal [], a
 
       # invalid input to minimum
       a = Commit.find_commit_range('active/foo', "31ce37fe365b3dc204300a3e4c396ad333ed0556 ; touch #{touchdir}/uh_oh", "31ce37fe365b3dc204300a3e4c396ad333ed0556", nil)
-      assert !File.exists?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'minimum' parameter of find_commit_range is exploitable"
+      assert !File.exist?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'minimum' parameter of find_commit_range is exploitable"
       assert_equal [], a
 
       # invalid input to minimum
       a = Commit.find_commit_range('active/foo', "$(uname>#{touchdir}/uh_oh)", "31ce37fe365b3dc204300a3e4c396ad333ed0556", nil)
-      assert !File.exists?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'minimum' parameter of find_commit_range is exploitable"
+      assert !File.exist?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'minimum' parameter of find_commit_range is exploitable"
       assert_equal [], a
 
       # invalid input to 'excludes'
       # complains "fatal: bad object 077ba2ad3ea24a929091a9e6ce545c93199b8e57"
       a = Commit.find_commit_range('active/foo', "31ce37fe365b3dc204300a3e4c396ad333ed0556", "077ba2ad3ea24a929091a9e6ce545c93199b8e57", ["4fe459abe02d9b365932b8f5dc419439ab4e2577 ; touch #{touchdir}/uh_oh"])
-      assert !File.exists?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'excludes' parameter of find_commit_range is exploitable"
+      assert !File.exist?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'excludes' parameter of find_commit_range is exploitable"
       assert_equal [], a
 
       # invalid input to 'excludes'
       # complains "fatal: bad object 077ba2ad3ea24a929091a9e6ce545c93199b8e57"
       a = Commit.find_commit_range('active/foo', "31ce37fe365b3dc204300a3e4c396ad333ed0556", "077ba2ad3ea24a929091a9e6ce545c93199b8e57", ["$(uname>#{touchdir}/uh_oh)"])
-      assert !File.exists?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'excludes' parameter of find_commit_range is exploitable"
+      assert !File.exist?("#{touchdir}/uh_oh"), "#{touchdir}/uh_oh should not exist, 'excludes' parameter of find_commit_range is exploitable"
       assert_equal [], a
     end
   end
diff --git a/services/api/test/unit/permission_test.rb b/services/api/test/unit/permission_test.rb
index 4a6ddc6..bc60f3b 100644
--- a/services/api/test/unit/permission_test.rb
+++ b/services/api/test/unit/permission_test.rb
@@ -144,7 +144,7 @@ class PermissionTest < ActiveSupport::TestCase
 
   # TODO(twp): fix bug #3091, which should fix this test.
   test "can_manage permission on a non-group object" do
-    skip
+    omit
     set_user_from_auth :admin
 
     ob = Specimen.create!

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list