[ARVADOS] updated: 1.3.0-2988-gd94f8f7d9

Git user git at public.arvados.org
Mon Aug 24 15:24:33 UTC 2020


Summary of changes:
 apps/workbench/Gemfile                             |  24 ++--
 apps/workbench/Gemfile.lock                        | 140 +++++++++++----------
 .../app/controllers/application_controller.rb      |   1 -
 apps/workbench/app/models/application_record.rb    |   7 --
 apps/workbench/app/models/arvados_base.rb          |   6 +
 apps/workbench/bin/bundle                          |   2 +-
 apps/workbench/bin/setup                           |   6 +-
 apps/workbench/bin/update                          |   3 +
 {services/api => apps/workbench}/bin/yarn          |   3 +-
 apps/workbench/config/application.default.yml      |   1 -
 apps/workbench/config/application.rb               |   7 +-
 apps/workbench/config/boot.rb                      |   1 +
 .../config/initializers/content_security_policy.rb |   0
 .../config/initializers/new_framework_defaults.rb  |   3 -
 .../initializers/new_framework_defaults_5_1.rb     |  18 +++
 .../initializers/new_framework_defaults_5_2.rb     |   0
 apps/workbench/config/routes.rb                    |   2 +-
 apps/workbench/config/secrets.yml                  |  18 +--
 services/api/app/models/container_request.rb       |   8 +-
 services/api/config/application.rb                 |   2 +-
 20 files changed, 147 insertions(+), 105 deletions(-)
 delete mode 100644 apps/workbench/app/models/application_record.rb
 copy {services/api => apps/workbench}/bin/yarn (90%)
 copy {services/api => apps/workbench}/config/initializers/content_security_policy.rb (100%)
 create mode 100644 apps/workbench/config/initializers/new_framework_defaults_5_1.rb
 copy {services/api => apps/workbench}/config/initializers/new_framework_defaults_5_2.rb (100%)

       via  d94f8f7d99dc2ea08db259e150269a2be7396ba5 (commit)
       via  0e4b898a5d6735be7e0ef902dc185f037428e6f1 (commit)
       via  27064ba138bfadd672ff71b32769cb357d051e01 (commit)
       via  a74931f3bb276c84ce164802b44b4486d1a9b54f (commit)
       via  3b1387f71c5e881f062cf620dbd0fb2634a5dd40 (commit)
       via  1a51cf3bb6753fc34c3cc8556ba656280d7b6b88 (commit)
       via  75eb37bf5ace53c447c8c6cbf069883fd1c47147 (commit)
       via  84d176d4e66d3eea140220ac8ec127ceba0f34a8 (commit)
       via  deac9af545f0da1903e41b9f1ac76b297232a643 (commit)
       via  36ccf5e18984c80f3903c08fec59e064fbbf4be9 (commit)
       via  6a4b8910332f7fcf9a5b0784467a6bfa0a702c70 (commit)
       via  e1c81c58c6810a1a84d71855330097c2fc4e2c3e (commit)
       via  29607f728e57e22021b827a6ec34daa8aaa04f5a (commit)
       via  d6897f2bee374d4a71fb96f0a794fba598174407 (commit)
      from  7a7a1395490eb9b9789b79f88a77fe709a898feb (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 d94f8f7d99dc2ea08db259e150269a2be7396ba5
Merge: 7a7a13954 0e4b898a5
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Aug 24 12:24:15 2020 -0300

    Merge branch '16470-wb-rails-52'
    Closes #16470
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>


commit 0e4b898a5d6735be7e0ef902dc185f037428e6f1
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Aug 17 16:39:01 2020 -0300

    16470: Pins launchy gem to avoid requiring ruby >= 2.4.0
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index 41b2fd26b..d5b416b53 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -38,8 +38,14 @@ group :assets do
   gem 'therubyracer', :platforms => :ruby
 end
 
-group :development do
+group :development, :test, :performance do
   gem 'byebug'
+  # Pinning launchy because 2.5 requires ruby >= 2.4, which arvbox currently
+  # doesn't have because of SSO.
+  gem 'launchy', '~> 2.4.0'
+end
+
+group :development do
   gem 'ruby-debug-passenger'
   gem 'rack-mini-profiler', require: false
   gem 'flamegraph', require: false
@@ -55,7 +61,6 @@ group :test, :diagnostics, :performance do
 end
 
 group :test, :performance do
-  gem 'byebug'
   gem 'rails-perftest'
   gem 'ruby-prof'
   gem 'rvm-capistrano'
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index f03740702..e19172cb2 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -158,8 +158,8 @@ GEM
       thor (>= 0.14, < 2.0)
     json (2.3.0)
     jwt (1.5.6)
-    launchy (2.5.0)
-      addressable (~> 2.7)
+    launchy (2.4.3)
+      addressable (~> 2.3)
     less (2.6.0)
       commonjs (~> 0.2.7)
     less-rails (4.0.0)
@@ -351,6 +351,7 @@ DEPENDENCIES
   headless (~> 1.0.2)
   httpclient (~> 2.5)
   jquery-rails
+  launchy (~> 2.4.0)
   less
   less-rails
   lograge

commit 27064ba138bfadd672ff71b32769cb357d051e01
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Thu Aug 13 15:01:42 2020 -0300

    16470: Fixes test failures caused by a change on ActiveModel::Dirty.
    
    This was a tough one to diagnose. The Dirty module introduced the usage of an
    attribute mutation tracker, being disabled here for functional tests to start
    working again.
    This commit is based on: https://github.com/Dynamoid/dynamoid/pull/256
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/app/models/arvados_base.rb b/apps/workbench/app/models/arvados_base.rb
index b9162c2ae..c5e1a4ed2 100644
--- a/apps/workbench/app/models/arvados_base.rb
+++ b/apps/workbench/app/models/arvados_base.rb
@@ -106,6 +106,12 @@ class ArvadosBase
     end
   end
 
+  # The ActiveModel::Dirty API was changed on Rails 5.2
+  # See: https://github.com/rails/rails/commit/c3675f50d2e59b7fc173d7b332860c4b1a24a726#diff-aaddd42c7feb0834b1b5c66af69814d3
+  def mutations_from_database
+    @mutations_from_database ||= ActiveModel::NullMutationTracker.instance
+  end
+
   def self.columns
     @discovered_columns = [] if !defined?(@discovered_columns)
     return @discovered_columns if @discovered_columns.andand.any?

commit a74931f3bb276c84ce164802b44b4486d1a9b54f
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Thu Aug 13 14:42:27 2020 -0300

    16470: Removes unused cruft.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index 976ff70ca..41b2fd26b 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -77,12 +77,6 @@ gem 'angularjs-rails', '~> 1.3.8'
 
 gem 'less'
 gem 'less-rails'
-
-# Wiselinks hasn't been updated for many years and it's using deprecated methods
-# Use our own Wiselinks fork until this PR is accepted:
-# https://github.com/igor-alexandrov/wiselinks/pull/116
-# gem 'wiselinks', git: 'https://github.com/arvados/wiselinks.git', branch: 'rails-5.1-compatibility'
-
 gem 'sshkey'
 
 # To use ActiveModel has_secure_password
diff --git a/apps/workbench/app/models/application_record.rb b/apps/workbench/app/models/application_record.rb
deleted file mode 100644
index 759034da6..000000000
--- a/apps/workbench/app/models/application_record.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-class ApplicationRecord < ActiveRecord::Base
-  self.abstract_class = true
-end
\ No newline at end of file

commit 3b1387f71c5e881f062cf620dbd0fb2634a5dd40
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Aug 10 11:57:45 2020 -0300

    16470: Cleans up config files.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/config/secrets.yml b/apps/workbench/config/secrets.yml
index bc8a0d0de..57399082e 100644
--- a/apps/workbench/config/secrets.yml
+++ b/apps/workbench/config/secrets.yml
@@ -11,16 +11,16 @@
 # no regular words or you'll be exposed to dictionary attacks.
 # You can use `rails secret` to generate a secure secret key.
 
-# Make sure the secrets in this file are kept private
-# if you're sharing your code publicly.
+# NOTE that these get overriden by Arvados' own configuration system.
 
-development:
-  secret_key_base: 33e2d171ec6c67cf8e9a9fbfadc1071328bdab761297e2fe28b9db7613dd542c1ba3bdb3bd3e636d1d6f74ab73a2d90c4e9c0ecc14fde8ccd153045f94e9cc41
+# development:
+#   secret_key_base: <%= rand(1<<255).to_s(36) %>
 
-test:
-  secret_key_base: d4c07cab3530fccf5d86565ecdc359eb2a853b8ede3b06edb2885e4423d7a726f50a3e415bb940fd4861e8fec16459665fd377acc8cdd98ea63294d2e0d12bb2
+# test:
+#   secret_key_base: <%= rand(1<<255).to_s(36) %>
 
-# Do not keep production secrets in the repository,
-# instead read values from the environment.
+# In case this doesn't get overriden for some reason, assign a random key
+# to gracefully degrade by rejecting cookies instead of by opening a
+# vulnerability.
 production:
-  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
+  secret_key_base: <%= rand(1<<255).to_s(36) %>
diff --git a/apps/workbench/config/storage.yml b/apps/workbench/config/storage.yml
deleted file mode 100644
index 5b2c94c43..000000000
--- a/apps/workbench/config/storage.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-test:
-  service: Disk
-  root: <%= Rails.root.join("tmp/storage") %>
-
-local:
-  service: Disk
-  root: <%= Rails.root.join("storage") %>
-
-# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
-# amazon:
-#   service: S3
-#   access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
-#   secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
-#   region: us-east-1
-#   bucket: your_own_bucket
-
-# Remember not to checkin your GCS keyfile to a repository
-# google:
-#   service: GCS
-#   project: your_project
-#   credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
-#   bucket: your_own_bucket
-
-# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
-# microsoft:
-#   service: AzureStorage
-#   storage_account_name: your_account_name
-#   storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
-#   container: your_container_name
-
-# mirror:
-#   service: Mirror
-#   primary: local
-#   mirrors: [ amazon, google, microsoft ]

commit 1a51cf3bb6753fc34c3cc8556ba656280d7b6b88
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Thu Aug 6 14:33:52 2020 -0300

    16470: Removes deprecated 'secret_token' config key.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 9456e6145..255ad44f8 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -77,7 +77,6 @@ test:
   action_mailer.delivery_method: :test
   active_support.deprecation: :stderr
   profiling_enabled: true
-  secret_token: <%= rand(2**256).to_s(36) %>
   secret_key_base: <%= rand(2**256).to_s(36) %>
   site_name: Workbench:test
 

commit 75eb37bf5ace53c447c8c6cbf069883fd1c47147
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Thu Aug 6 14:33:36 2020 -0300

    16470: Updates & additions by running 'rails app:update'
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index ddcd3ea08..976ff70ca 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -18,6 +18,9 @@ gem 'responders', '~> 2.0'
 # See: https://github.com/rails/sprockets-rails/issues/443
 gem 'sprockets', '~> 3.0'
 
+# Fast app boot times
+gem 'bootsnap', require: false
+
 # Note: keeping this out of the "group :assets" section "may" allow us
 # to use Coffescript for UJS responses. It also prevents a
 # warning/problem when running tests: "WARN: tilt autoloading
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index eae26c67a..f03740702 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -93,6 +93,8 @@ GEM
       multi_json (>= 1.0.0)
     autoprefixer-rails (9.5.1.1)
       execjs
+    bootsnap (1.4.7)
+      msgpack (~> 1.0)
     bootstrap-sass (3.4.1)
       autoprefixer-rails (>= 5.2.1)
       sassc (>= 2.0.0)
@@ -192,6 +194,7 @@ GEM
       metaclass (~> 0.0.1)
     morrisjs-rails (0.5.1.2)
       railties (> 3.1, < 6)
+    msgpack (1.3.3)
     multi_json (1.15.0)
     multipart-post (2.1.1)
     net-scp (2.0.0)
@@ -336,6 +339,7 @@ DEPENDENCIES
   andand
   angularjs-rails (~> 1.3.8)
   arvados!
+  bootsnap
   bootstrap-sass (~> 3.4.1)
   bootstrap-tab-history-rails
   bootstrap-x-editable-rails
diff --git a/apps/workbench/bin/bundle b/apps/workbench/bin/bundle
index 9447ba861..cb10307ac 100755
--- a/apps/workbench/bin/bundle
+++ b/apps/workbench/bin/bundle
@@ -3,5 +3,5 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
 load Gem.bin_path('bundler', 'bundle')
diff --git a/apps/workbench/bin/setup b/apps/workbench/bin/setup
index 50c3fa054..7aed0fb28 100755
--- a/apps/workbench/bin/setup
+++ b/apps/workbench/bin/setup
@@ -3,12 +3,11 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-require 'pathname'
 require 'fileutils'
 include FileUtils
 
 # path to your application root.
-APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+APP_ROOT = File.expand_path('..', __dir__)
 
 def system!(*args)
   system(*args) || abort("\n== Command #{args} failed ==")
@@ -22,6 +21,9 @@ chdir APP_ROOT do
   system! 'gem install bundler --conservative'
   system('bundle check') || system!('bundle install')
 
+  # Install JavaScript dependencies if using Yarn
+  # system('bin/yarn')
+
   # puts "\n== Copying sample files =="
   # unless File.exist?('config/database.yml')
   #   cp 'config/database.yml.sample', 'config/database.yml'
diff --git a/apps/workbench/bin/update b/apps/workbench/bin/update
index b56771ece..46aa76ca8 100755
--- a/apps/workbench/bin/update
+++ b/apps/workbench/bin/update
@@ -22,6 +22,9 @@ chdir APP_ROOT do
   system! 'gem install bundler --conservative'
   system('bundle check') || system!('bundle install')
 
+  # Install JavaScript dependencies if using Yarn
+  # system('bin/yarn')
+
   puts "\n== Updating database =="
   system! 'bin/rails db:migrate'
 
diff --git a/apps/workbench/bin/yarn b/apps/workbench/bin/yarn
index 7874468b1..5fc761195 100755
--- a/apps/workbench/bin/yarn
+++ b/apps/workbench/bin/yarn
@@ -3,8 +3,8 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-VENDOR_PATH = File.expand_path('..', __dir__)
-Dir.chdir(VENDOR_PATH) do
+APP_ROOT = File.expand_path('..', __dir__)
+Dir.chdir(APP_ROOT) do
   begin
     exec "yarnpkg #{ARGV.join(" ")}"
   rescue Errno::ENOENT
diff --git a/apps/workbench/config/application.rb b/apps/workbench/config/application.rb
index 18e6ef38d..42bf4da24 100644
--- a/apps/workbench/config/application.rb
+++ b/apps/workbench/config/application.rb
@@ -2,7 +2,7 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-require File.expand_path('../boot', __FILE__)
+require_relative 'boot'
 
 require "rails"
 # Pick only the frameworks we need:
diff --git a/apps/workbench/config/boot.rb b/apps/workbench/config/boot.rb
index 815326668..6add5911f 100644
--- a/apps/workbench/config/boot.rb
+++ b/apps/workbench/config/boot.rb
@@ -8,6 +8,7 @@ require 'rubygems'
 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
 
 require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
+require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
 
 # Use ARVADOS_API_TOKEN environment variable (if set) in console
 require 'rails'
diff --git a/apps/workbench/config/initializers/content_security_policy.rb b/apps/workbench/config/initializers/content_security_policy.rb
new file mode 100644
index 000000000..853ecdeec
--- /dev/null
+++ b/apps/workbench/config/initializers/content_security_policy.rb
@@ -0,0 +1,29 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+# Be sure to restart your server when you modify this file.
+
+# Define an application-wide content security policy
+# For further information see the following documentation
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
+
+# Rails.application.config.content_security_policy do |policy|
+#   policy.default_src :self, :https
+#   policy.font_src    :self, :https, :data
+#   policy.img_src     :self, :https, :data
+#   policy.object_src  :none
+#   policy.script_src  :self, :https
+#   policy.style_src   :self, :https
+
+#   # Specify URI for violation reports
+#   # policy.report_uri "/csp-violation-report-endpoint"
+# end
+
+# If you are using UJS then enable automatic nonce generation
+# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
+
+# Report CSP violations to a specified URI
+# For further information see the following documentation:
+# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
+# Rails.application.config.content_security_policy_report_only = true
diff --git a/apps/workbench/config/initializers/new_framework_defaults_5_2.rb b/apps/workbench/config/initializers/new_framework_defaults_5_2.rb
new file mode 100644
index 000000000..93a8d5240
--- /dev/null
+++ b/apps/workbench/config/initializers/new_framework_defaults_5_2.rb
@@ -0,0 +1,42 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+# Be sure to restart your server when you modify this file.
+#
+# This file contains migration options to ease your Rails 5.2 upgrade.
+#
+# Once upgraded flip defaults one by one to migrate to the new default.
+#
+# Read the Guide for Upgrading Ruby on Rails for more info on each option.
+
+# Make Active Record use stable #cache_key alongside new #cache_version method.
+# This is needed for recyclable cache keys.
+# Rails.application.config.active_record.cache_versioning = true
+
+# Use AES-256-GCM authenticated encryption for encrypted cookies.
+# Also, embed cookie expiry in signed or encrypted cookies for increased security.
+#
+# This option is not backwards compatible with earlier Rails versions.
+# It's best enabled when your entire app is migrated and stable on 5.2.
+#
+# Existing cookies will be converted on read then written with the new scheme.
+# Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true
+
+# Use AES-256-GCM authenticated encryption as default cipher for encrypting messages
+# instead of AES-256-CBC, when use_authenticated_message_encryption is set to true.
+# Rails.application.config.active_support.use_authenticated_message_encryption = true
+
+# Add default protection from forgery to ActionController::Base instead of in
+# ApplicationController.
+# Rails.application.config.action_controller.default_protect_from_forgery = true
+
+# Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
+# 'f' after migrating old data.
+# Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
+
+# Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header.
+# Rails.application.config.active_support.use_sha1_digests = true
+
+# Make `form_with` generate id attributes for any generated HTML tags.
+# Rails.application.config.action_view.form_with_generates_ids = true
diff --git a/apps/workbench/config/storage.yml b/apps/workbench/config/storage.yml
new file mode 100644
index 000000000..5b2c94c43
--- /dev/null
+++ b/apps/workbench/config/storage.yml
@@ -0,0 +1,38 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+test:
+  service: Disk
+  root: <%= Rails.root.join("tmp/storage") %>
+
+local:
+  service: Disk
+  root: <%= Rails.root.join("storage") %>
+
+# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
+# amazon:
+#   service: S3
+#   access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
+#   secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
+#   region: us-east-1
+#   bucket: your_own_bucket
+
+# Remember not to checkin your GCS keyfile to a repository
+# google:
+#   service: GCS
+#   project: your_project
+#   credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
+#   bucket: your_own_bucket
+
+# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
+# microsoft:
+#   service: AzureStorage
+#   storage_account_name: your_account_name
+#   storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
+#   container: your_container_name
+
+# mirror:
+#   service: Mirror
+#   primary: local
+#   mirrors: [ amazon, google, microsoft ]

commit 84d176d4e66d3eea140220ac8ec127ceba0f34a8
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Wed Aug 5 16:57:26 2020 -0300

    16470: Removes exception deprecated on rails 3.2
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 8d6f897bb..77ec68bdb 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -29,7 +29,6 @@ class ApplicationController < ActionController::Base
   begin
     rescue_from(ActiveRecord::RecordNotFound,
                 ActionController::RoutingError,
-                ActionController::UnknownController,
                 AbstractController::ActionNotFound,
                 with: :render_not_found)
     rescue_from(Exception,

commit deac9af545f0da1903e41b9f1ac76b297232a643
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Wed Aug 5 16:53:13 2020 -0300

    16470: Upgrades to rails 5.2.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index 9a28441b8..ddcd3ea08 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -4,7 +4,7 @@
 
 source 'https://rubygems.org'
 
-gem 'rails', '5.1.7'
+gem 'rails', '~> 5.2.0'
 gem 'arvados', git: 'https://github.com/arvados/arvados.git', glob: 'sdk/ruby/arvados.gemspec'
 
 gem 'activerecord-nulldb-adapter', git: 'https://github.com/arvados/nulldb'
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index ce737b891..eae26c67a 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -30,39 +30,43 @@ GEM
   remote: https://rubygems.org/
   specs:
     RedCloth (4.3.2)
-    actioncable (5.1.7)
-      actionpack (= 5.1.7)
+    actioncable (5.2.4.3)
+      actionpack (= 5.2.4.3)
       nio4r (~> 2.0)
-      websocket-driver (~> 0.6.1)
-    actionmailer (5.1.7)
-      actionpack (= 5.1.7)
-      actionview (= 5.1.7)
-      activejob (= 5.1.7)
+      websocket-driver (>= 0.6.1)
+    actionmailer (5.2.4.3)
+      actionpack (= 5.2.4.3)
+      actionview (= 5.2.4.3)
+      activejob (= 5.2.4.3)
       mail (~> 2.5, >= 2.5.4)
       rails-dom-testing (~> 2.0)
-    actionpack (5.1.7)
-      actionview (= 5.1.7)
-      activesupport (= 5.1.7)
-      rack (~> 2.0)
+    actionpack (5.2.4.3)
+      actionview (= 5.2.4.3)
+      activesupport (= 5.2.4.3)
+      rack (~> 2.0, >= 2.0.8)
       rack-test (>= 0.6.3)
       rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    actionview (5.1.7)
-      activesupport (= 5.1.7)
+    actionview (5.2.4.3)
+      activesupport (= 5.2.4.3)
       builder (~> 3.1)
       erubi (~> 1.4)
       rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.0, >= 1.0.3)
-    activejob (5.1.7)
-      activesupport (= 5.1.7)
+    activejob (5.2.4.3)
+      activesupport (= 5.2.4.3)
       globalid (>= 0.3.6)
-    activemodel (5.1.7)
-      activesupport (= 5.1.7)
-    activerecord (5.1.7)
-      activemodel (= 5.1.7)
-      activesupport (= 5.1.7)
-      arel (~> 8.0)
-    activesupport (5.1.7)
+    activemodel (5.2.4.3)
+      activesupport (= 5.2.4.3)
+    activerecord (5.2.4.3)
+      activemodel (= 5.2.4.3)
+      activesupport (= 5.2.4.3)
+      arel (>= 9.0)
+    activestorage (5.2.4.3)
+      actionpack (= 5.2.4.3)
+      activerecord (= 5.2.4.3)
+      marcel (~> 0.3.1)
+    activesupport (5.2.4.3)
       concurrent-ruby (~> 1.0, >= 1.0.2)
       i18n (>= 0.7, < 2)
       minitest (~> 5.1)
@@ -71,7 +75,7 @@ GEM
       public_suffix (>= 2.0.2, < 5.0)
     andand (1.3.3)
     angularjs-rails (1.3.15)
-    arel (8.0.0)
+    arel (9.0.0)
     arvados-google-api-client (0.8.7.4)
       activesupport (>= 3.2, < 5.3)
       addressable (~> 2.3)
@@ -172,12 +176,15 @@ GEM
       nokogiri (>= 1.5.9)
     mail (2.7.1)
       mini_mime (>= 0.1.1)
+    marcel (0.3.3)
+      mimemagic (~> 0.3.2)
     memoist (0.16.2)
     metaclass (0.0.4)
     method_source (1.0.0)
     mime-types (3.2.2)
       mime-types-data (~> 3.2015)
     mime-types-data (3.2019.0331)
+    mimemagic (0.3.5)
     mini_mime (1.0.2)
     mini_portile2 (2.4.0)
     minitest (5.10.3)
@@ -219,17 +226,18 @@ GEM
       rack (>= 1.2.0)
     rack-test (1.1.0)
       rack (>= 1.0, < 3)
-    rails (5.1.7)
-      actioncable (= 5.1.7)
-      actionmailer (= 5.1.7)
-      actionpack (= 5.1.7)
-      actionview (= 5.1.7)
-      activejob (= 5.1.7)
-      activemodel (= 5.1.7)
-      activerecord (= 5.1.7)
-      activesupport (= 5.1.7)
+    rails (5.2.4.3)
+      actioncable (= 5.2.4.3)
+      actionmailer (= 5.2.4.3)
+      actionpack (= 5.2.4.3)
+      actionview (= 5.2.4.3)
+      activejob (= 5.2.4.3)
+      activemodel (= 5.2.4.3)
+      activerecord (= 5.2.4.3)
+      activestorage (= 5.2.4.3)
+      activesupport (= 5.2.4.3)
       bundler (>= 1.3.0)
-      railties (= 5.1.7)
+      railties (= 5.2.4.3)
       sprockets-rails (>= 2.0.0)
     rails-controller-testing (1.0.4)
       actionpack (>= 5.0.1.x)
@@ -241,12 +249,12 @@ GEM
     rails-html-sanitizer (1.3.0)
       loofah (~> 2.3)
     rails-perftest (0.0.7)
-    railties (5.1.7)
-      actionpack (= 5.1.7)
-      activesupport (= 5.1.7)
+    railties (5.2.4.3)
+      actionpack (= 5.2.4.3)
+      activesupport (= 5.2.4.3)
       method_source
       rake (>= 0.8.7)
-      thor (>= 0.18.1, < 2.0)
+      thor (>= 0.19.0, < 2.0)
     rake (13.0.1)
     raphael-rails (2.1.2)
     rb-fsevent (0.10.3)
@@ -313,7 +321,7 @@ GEM
     uglifier (2.7.2)
       execjs (>= 0.3.0)
       json (>= 1.8.0)
-    websocket-driver (0.6.5)
+    websocket-driver (0.7.3)
       websocket-extensions (>= 0.1.0)
     websocket-extensions (0.1.5)
     xpath (2.1.0)
@@ -354,7 +362,7 @@ DEPENDENCIES
   piwik_analytics
   poltergeist (~> 1.5.1)
   rack-mini-profiler
-  rails (= 5.1.7)
+  rails (~> 5.2.0)
   rails-controller-testing
   rails-perftest
   raphael-rails

commit 36ccf5e18984c80f3903c08fec59e064fbbf4be9
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Wed Aug 5 16:43:54 2020 -0300

    16470: Fixes deprecation warning.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/config/initializers/new_framework_defaults.rb b/apps/workbench/config/initializers/new_framework_defaults.rb
index b8dca33a3..2e2f0b181 100644
--- a/apps/workbench/config/initializers/new_framework_defaults.rb
+++ b/apps/workbench/config/initializers/new_framework_defaults.rb
@@ -24,6 +24,3 @@ ActiveSupport.to_time_preserves_timezone = false
 
 # Require `belongs_to` associations by default. Previous versions had false.
 Rails.application.config.active_record.belongs_to_required_by_default = false
-
-# Do not halt callback chains when a callback returns false. Previous versions had true.
-ActiveSupport.halt_callback_chains_on_return_false = true

commit 6a4b8910332f7fcf9a5b0784467a6bfa0a702c70
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Wed Aug 5 15:39:47 2020 -0300

    16470: Applies changes from 'rails app:update'.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/bin/yarn b/apps/workbench/bin/yarn
new file mode 100755
index 000000000..7874468b1
--- /dev/null
+++ b/apps/workbench/bin/yarn
@@ -0,0 +1,15 @@
+#!/usr/bin/env ruby
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+VENDOR_PATH = File.expand_path('..', __dir__)
+Dir.chdir(VENDOR_PATH) do
+  begin
+    exec "yarnpkg #{ARGV.join(" ")}"
+  rescue Errno::ENOENT
+    $stderr.puts "Yarn executable was not detected in the system."
+    $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
+    exit 1
+  end
+end
diff --git a/apps/workbench/config/application.rb b/apps/workbench/config/application.rb
index e88229b85..18e6ef38d 100644
--- a/apps/workbench/config/application.rb
+++ b/apps/workbench/config/application.rb
@@ -9,6 +9,8 @@ require "rails"
 require "active_model/railtie"
 require "active_job/railtie"
 require "active_record/railtie"
+# Skip ActiveStorage (new in Rails 5.1)
+# require "active_storage/engine"
 require "action_controller/railtie"
 require "action_mailer/railtie"
 require "action_view/railtie"
@@ -28,6 +30,9 @@ module ArvadosWorkbench
 
     require_relative "arvados_config.rb"
 
+    # Initialize configuration defaults for originally generated Rails version.
+    config.load_defaults 5.1
+
     # Settings in config/environments/* take precedence over those specified here.
     # Application configuration should go into files in config/initializers
     # -- all .rb files in that directory are automatically loaded.
diff --git a/apps/workbench/config/initializers/new_framework_defaults_5_1.rb b/apps/workbench/config/initializers/new_framework_defaults_5_1.rb
new file mode 100644
index 000000000..804ee6f50
--- /dev/null
+++ b/apps/workbench/config/initializers/new_framework_defaults_5_1.rb
@@ -0,0 +1,18 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+# Be sure to restart your server when you modify this file.
+#
+# This file contains migration options to ease your Rails 5.1 upgrade.
+#
+# Once upgraded flip defaults one by one to migrate to the new default.
+#
+# Read the Guide for Upgrading Ruby on Rails for more info on each option.
+
+# Make `form_with` generate non-remote forms.
+Rails.application.config.action_view.form_with_generates_remote_forms = false
+
+# Unknown asset fallback will return the path passed in when the given
+# asset is not present in the asset pipeline.
+# Rails.application.config.assets.unknown_asset_fallback = false
diff --git a/apps/workbench/config/routes.rb b/apps/workbench/config/routes.rb
index 718adfd2e..ffc09ac93 100644
--- a/apps/workbench/config/routes.rb
+++ b/apps/workbench/config/routes.rb
@@ -2,7 +2,7 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-ArvadosWorkbench::Application.routes.draw do
+Rails.application.routes.draw do
   themes_for_rails
 
   resources :keep_disks
diff --git a/services/api/config/application.rb b/services/api/config/application.rb
index 369294e8a..b28ae0e07 100644
--- a/services/api/config/application.rb
+++ b/services/api/config/application.rb
@@ -16,7 +16,7 @@ require "sprockets/railtie"
 require "rails/test_unit/railtie"
 # Skipping the following:
 # * ActionCable (new in Rails 5.0) as it adds '/cable' routes that we're not using
-# * Skip ActiveStorage (new in Rails 5.1)
+# * ActiveStorage (new in Rails 5.1)
 
 require 'digest'
 

commit e1c81c58c6810a1a84d71855330097c2fc4e2c3e
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Wed Aug 5 14:43:50 2020 -0300

    16470: Pins the sprocket gem to avoid upgrading to 4.0, that causes issues.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index db0c95908..9a28441b8 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -14,6 +14,10 @@ gem 'sass'
 gem 'mime-types'
 gem 'responders', '~> 2.0'
 
+# Pin sprockets to < 4.0 to avoid issues when upgrading rails to 5.2
+# See: https://github.com/rails/sprockets-rails/issues/443
+gem 'sprockets', '~> 3.0'
+
 # Note: keeping this out of the "group :assets" section "may" allow us
 # to use Coffescript for UJS responses. It also prevents a
 # warning/problem when running tests: "WARN: tilt autoloading
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index 642ac2cb0..ce737b891 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -294,7 +294,7 @@ GEM
     simplecov-html (0.10.2)
     simplecov-rcov (0.2.3)
       simplecov (>= 0.4.1)
-    sprockets (4.0.2)
+    sprockets (3.7.2)
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
     sprockets-rails (3.2.1)
@@ -369,6 +369,7 @@ DEPENDENCIES
   signet (< 0.12)
   simplecov (~> 0.7)
   simplecov-rcov
+  sprockets (~> 3.0)
   sshkey
   themes_for_rails!
   therubyracer

commit 29607f728e57e22021b827a6ec34daa8aaa04f5a
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Wed Aug 5 13:06:34 2020 -0300

    16470: Upgrades rails to 5.1.7 on workbench.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index 24bfba383..db0c95908 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -4,7 +4,7 @@
 
 source 'https://rubygems.org'
 
-gem 'rails', '~> 5.0.0'
+gem 'rails', '5.1.7'
 gem 'arvados', git: 'https://github.com/arvados/arvados.git', glob: 'sdk/ruby/arvados.gemspec'
 
 gem 'activerecord-nulldb-adapter', git: 'https://github.com/arvados/nulldb'
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index cb4e7ab9e..642ac2cb0 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -30,39 +30,39 @@ GEM
   remote: https://rubygems.org/
   specs:
     RedCloth (4.3.2)
-    actioncable (5.0.7.2)
-      actionpack (= 5.0.7.2)
-      nio4r (>= 1.2, < 3.0)
+    actioncable (5.1.7)
+      actionpack (= 5.1.7)
+      nio4r (~> 2.0)
       websocket-driver (~> 0.6.1)
-    actionmailer (5.0.7.2)
-      actionpack (= 5.0.7.2)
-      actionview (= 5.0.7.2)
-      activejob (= 5.0.7.2)
+    actionmailer (5.1.7)
+      actionpack (= 5.1.7)
+      actionview (= 5.1.7)
+      activejob (= 5.1.7)
       mail (~> 2.5, >= 2.5.4)
       rails-dom-testing (~> 2.0)
-    actionpack (5.0.7.2)
-      actionview (= 5.0.7.2)
-      activesupport (= 5.0.7.2)
+    actionpack (5.1.7)
+      actionview (= 5.1.7)
+      activesupport (= 5.1.7)
       rack (~> 2.0)
-      rack-test (~> 0.6.3)
+      rack-test (>= 0.6.3)
       rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    actionview (5.0.7.2)
-      activesupport (= 5.0.7.2)
+    actionview (5.1.7)
+      activesupport (= 5.1.7)
       builder (~> 3.1)
-      erubis (~> 2.7.0)
+      erubi (~> 1.4)
       rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.0, >= 1.0.3)
-    activejob (5.0.7.2)
-      activesupport (= 5.0.7.2)
+    activejob (5.1.7)
+      activesupport (= 5.1.7)
       globalid (>= 0.3.6)
-    activemodel (5.0.7.2)
-      activesupport (= 5.0.7.2)
-    activerecord (5.0.7.2)
-      activemodel (= 5.0.7.2)
-      activesupport (= 5.0.7.2)
-      arel (~> 7.0)
-    activesupport (5.0.7.2)
+    activemodel (5.1.7)
+      activesupport (= 5.1.7)
+    activerecord (5.1.7)
+      activemodel (= 5.1.7)
+      activesupport (= 5.1.7)
+      arel (~> 8.0)
+    activesupport (5.1.7)
       concurrent-ruby (~> 1.0, >= 1.0.2)
       i18n (>= 0.7, < 2)
       minitest (~> 5.1)
@@ -71,9 +71,9 @@ GEM
       public_suffix (>= 2.0.2, < 5.0)
     andand (1.3.3)
     angularjs-rails (1.3.15)
-    arel (7.1.4)
-    arvados-google-api-client (0.8.7.3)
-      activesupport (>= 3.2, < 5.1)
+    arel (8.0.0)
+    arvados-google-api-client (0.8.7.4)
+      activesupport (>= 3.2, < 5.3)
       addressable (~> 2.3)
       autoparse (~> 0.3)
       extlib (~> 0.9)
@@ -96,7 +96,7 @@ GEM
       railties (>= 3.1)
     bootstrap-x-editable-rails (1.5.1.1)
       railties (>= 3.0)
-    builder (3.2.3)
+    builder (3.2.4)
     byebug (11.0.1)
     capistrano (2.15.9)
       highline
@@ -121,11 +121,11 @@ GEM
       execjs
     coffee-script-source (1.12.2)
     commonjs (0.2.7)
-    concurrent-ruby (1.1.5)
-    crass (1.0.5)
+    concurrent-ruby (1.1.6)
+    crass (1.0.6)
     deep_merge (1.2.1)
     docile (1.3.1)
-    erubis (2.7.0)
+    erubi (1.9.0)
     execjs (2.7.0)
     extlib (0.9.16)
     faraday (0.15.4)
@@ -152,8 +152,8 @@ GEM
       thor (>= 0.14, < 2.0)
     json (2.3.0)
     jwt (1.5.6)
-    launchy (2.4.3)
-      addressable (~> 2.3)
+    launchy (2.5.0)
+      addressable (~> 2.7)
     less (2.6.0)
       commonjs (~> 0.2.7)
     less-rails (4.0.0)
@@ -167,25 +167,25 @@ GEM
       railties (>= 4)
       request_store (~> 1.0)
     logstash-event (1.2.02)
-    loofah (2.3.1)
+    loofah (2.6.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.5.9)
     mail (2.7.1)
       mini_mime (>= 0.1.1)
     memoist (0.16.2)
     metaclass (0.0.4)
-    method_source (0.9.2)
+    method_source (1.0.0)
     mime-types (3.2.2)
       mime-types-data (~> 3.2015)
     mime-types-data (3.2019.0331)
-    mini_mime (1.0.1)
+    mini_mime (1.0.2)
     mini_portile2 (2.4.0)
     minitest (5.10.3)
     mocha (1.8.0)
       metaclass (~> 0.0.1)
     morrisjs-rails (0.5.1.2)
       railties (> 3.1, < 6)
-    multi_json (1.14.1)
+    multi_json (1.15.0)
     multipart-post (2.1.1)
     net-scp (2.0.0)
       net-ssh (>= 2.6.5, < 6.0.0)
@@ -194,13 +194,13 @@ GEM
     net-ssh (5.2.0)
     net-ssh-gateway (2.0.0)
       net-ssh (>= 4.0.0)
-    nio4r (2.3.1)
-    nokogiri (1.10.8)
+    nio4r (2.5.2)
+    nokogiri (1.10.10)
       mini_portile2 (~> 2.4.0)
     npm-rails (0.2.1)
       rails (>= 3.2)
     oj (3.7.12)
-    os (1.0.1)
+    os (1.1.1)
     passenger (6.0.2)
       rack
       rake (>= 0.8.1)
@@ -213,23 +213,23 @@ GEM
       cliver (~> 0.3.1)
       multi_json (~> 1.0)
       websocket-driver (>= 0.2.0)
-    public_suffix (4.0.3)
+    public_suffix (4.0.5)
     rack (2.2.3)
     rack-mini-profiler (1.0.2)
       rack (>= 1.2.0)
-    rack-test (0.6.3)
-      rack (>= 1.0)
-    rails (5.0.7.2)
-      actioncable (= 5.0.7.2)
-      actionmailer (= 5.0.7.2)
-      actionpack (= 5.0.7.2)
-      actionview (= 5.0.7.2)
-      activejob (= 5.0.7.2)
-      activemodel (= 5.0.7.2)
-      activerecord (= 5.0.7.2)
-      activesupport (= 5.0.7.2)
+    rack-test (1.1.0)
+      rack (>= 1.0, < 3)
+    rails (5.1.7)
+      actioncable (= 5.1.7)
+      actionmailer (= 5.1.7)
+      actionpack (= 5.1.7)
+      actionview (= 5.1.7)
+      activejob (= 5.1.7)
+      activemodel (= 5.1.7)
+      activerecord (= 5.1.7)
+      activesupport (= 5.1.7)
       bundler (>= 1.3.0)
-      railties (= 5.0.7.2)
+      railties (= 5.1.7)
       sprockets-rails (>= 2.0.0)
     rails-controller-testing (1.0.4)
       actionpack (>= 5.0.1.x)
@@ -238,12 +238,12 @@ GEM
     rails-dom-testing (2.0.3)
       activesupport (>= 4.2.0)
       nokogiri (>= 1.6)
-    rails-html-sanitizer (1.0.4)
-      loofah (~> 2.2, >= 2.2.2)
+    rails-html-sanitizer (1.3.0)
+      loofah (~> 2.3)
     rails-perftest (0.0.7)
-    railties (5.0.7.2)
-      actionpack (= 5.0.7.2)
-      activesupport (= 5.0.7.2)
+    railties (5.1.7)
+      actionpack (= 5.1.7)
+      activesupport (= 5.1.7)
       method_source
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
@@ -294,7 +294,7 @@ GEM
     simplecov-html (0.10.2)
     simplecov-rcov (0.2.3)
       simplecov (>= 0.4.1)
-    sprockets (3.7.2)
+    sprockets (4.0.2)
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
     sprockets-rails (3.2.1)
@@ -305,10 +305,10 @@ GEM
     therubyracer (0.12.3)
       libv8 (~> 3.16.14.15)
       ref
-    thor (0.20.3)
+    thor (1.0.1)
     thread_safe (0.3.6)
     tilt (2.0.9)
-    tzinfo (1.2.6)
+    tzinfo (1.2.7)
       thread_safe (~> 0.1)
     uglifier (2.7.2)
       execjs (>= 0.3.0)
@@ -354,7 +354,7 @@ DEPENDENCIES
   piwik_analytics
   poltergeist (~> 1.5.1)
   rack-mini-profiler
-  rails (~> 5.0.0)
+  rails (= 5.1.7)
   rails-controller-testing
   rails-perftest
   raphael-rails
@@ -375,4 +375,4 @@ DEPENDENCIES
   uglifier (~> 2.0)
 
 BUNDLED WITH
-   1.16.6
+   1.17.3

commit d6897f2bee374d4a71fb96f0a794fba598174407
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Fri Jul 24 17:12:27 2020 -0300

    16470: Fixes the last deprecation warnings.
    
    It turned out that .lock!() is an ActiveRecord method, and I was confusing it
    with Container::lock and ContainerRequest::lock.
    Both lock! and with_lock methods need the record to be persisted or reloaded
    explicitly.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/services/api/app/models/container_request.rb b/services/api/app/models/container_request.rb
index 77536eee4..16b497321 100644
--- a/services/api/app/models/container_request.rb
+++ b/services/api/app/models/container_request.rb
@@ -123,10 +123,10 @@ class ContainerRequest < ArvadosModel
     while true
       # get container lock first, then lock current container request
       # (same order as Container#handle_completed). Locking always
-      # reloads the Container and ContainerRequest records.
+      # requires explicit Container and ContainerRequest records reload.
       c = Container.find_by_uuid(container_uuid)
-      c.lock! if !c.nil?
-      self.lock!
+      c.reload.lock! if !c.nil?
+      self.reload.lock!
 
       if !c.nil? && container_uuid != c.uuid
         # After locking, we've noticed a race, the container_uuid is
@@ -263,7 +263,7 @@ class ContainerRequest < ArvadosModel
     if state_changed? and state == Committed and container_uuid.nil?
       while true
         c = Container.resolve(self)
-        c.lock!
+        c.reload.lock!
         if c.state == Container::Cancelled
           # Lost a race, we have a lock on the container but the
           # container was cancelled in a different request, restart

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list