[ARVADOS] updated: 1.3.0-2867-g56766d265

Git user git at public.arvados.org
Mon Aug 17 17:43:06 UTC 2020


Summary of changes:
 services/api/config/initializers/preload_all_models.rb | 15 ---------------
 1 file changed, 15 deletions(-)
 delete mode 100644 services/api/config/initializers/preload_all_models.rb

       via  56766d265a6f2209ca945e0c4e54726f83aad324 (commit)
      from  4c417c02b975f20938fc40ab007e351ea80d4666 (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 56766d265a6f2209ca945e0c4e54726f83aad324
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Aug 17 14:38:06 2020 -0300

    16470: Avoids crashing when running db:create in development mode.
    
    The 'preload_all_models' initializer is now run even when db:create is
    called, so it avoids the database to be created on arvbox, for example,
    because it attempts to access the database before being created.
    
    This initializer was added 7 years ago and it now seems to not be needed
    anymore, so I think it's the cleaner way to resolve this issue.
    
    See: https://github.com/rails/rails/issues/32870
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/services/api/config/initializers/preload_all_models.rb b/services/api/config/initializers/preload_all_models.rb
deleted file mode 100644
index 713c61fd7..000000000
--- a/services/api/config/initializers/preload_all_models.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-# See http://aaronvb.com/articles/37-rails-caching-and-undefined-class-module
-
-# Config must be done before we load model class files; otherwise they
-# won't be able to use Rails.configuration.* to initialize their
-# classes.
-
-if Rails.env == 'development'
-  Dir.foreach("#{Rails.root}/app/models") do |model_file|
-    require_dependency model_file if model_file.match(/\.rb$/)
-  end
-end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list