[ARVADOS] updated: 1.3.0-732-g4475be516
Git user
git at public.curoverse.com
Wed Apr 10 18:07:38 UTC 2019
Summary of changes:
services/api/config/application.rb | 2 ++
services/api/config/arvados_config.rb | 4 ++++
services/api/config/environment.rb | 1 -
services/api/config/initializers/legacy_jobs_api.rb | 8 ++------
4 files changed, 8 insertions(+), 7 deletions(-)
via 4475be5167afe63bef3ffe2b8145d35aaebe4761 (commit)
from f195fde23e4b21d99519906be14aa21ae4ef0834 (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 4475be5167afe63bef3ffe2b8145d35aaebe4761
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Wed Apr 10 14:06:41 2019 -0400
13996: Move configuration load earlier, before database setup
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/services/api/config/application.rb b/services/api/config/application.rb
index d6fcc9ea0..9a4270ad9 100644
--- a/services/api/config/application.rb
+++ b/services/api/config/application.rb
@@ -45,6 +45,8 @@ module Server
# The following is to avoid SafeYAML's warning message
SafeYAML::OPTIONS[:default_mode] = :safe
+ require_relative "arvados_config.rb"
+
# 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/services/api/config/arvados_config.rb b/services/api/config/arvados_config.rb
index 219455e32..835666bdd 100644
--- a/services/api/config/arvados_config.rb
+++ b/services/api/config/arvados_config.rb
@@ -205,6 +205,10 @@ if ::Rails.env.to_s == "test"
$arvados_config["PostgreSQL"]["Connection"]["DBName"] = "arvados_test"
end
+if $arvados_config["PostgreSQL"]["Connection"]["Password"].empty?
+ raise "Database password is empty, PostgreSQL section is: #{$arvados_config["PostgreSQL"]}"
+end
+
dbhost = $arvados_config["PostgreSQL"]["Connection"]["Host"]
if $arvados_config["PostgreSQL"]["Connection"]["Post"] != 0
dbhost += ":#{$arvados_config["PostgreSQL"]["Connection"]["Post"]}"
diff --git a/services/api/config/environment.rb b/services/api/config/environment.rb
index fbca77736..b82ba27f9 100644
--- a/services/api/config/environment.rb
+++ b/services/api/config/environment.rb
@@ -5,7 +5,6 @@
# Load the rails application
require_relative 'application'
require 'josh_id'
-require_relative 'arvados_config'
# Initialize the rails application
Rails.application.initialize!
diff --git a/services/api/config/initializers/legacy_jobs_api.rb b/services/api/config/initializers/legacy_jobs_api.rb
index 2faf0dac4..8f3b3cb5f 100644
--- a/services/api/config/initializers/legacy_jobs_api.rb
+++ b/services/api/config/initializers/legacy_jobs_api.rb
@@ -9,11 +9,7 @@
require 'enable_jobs_api'
Server::Application.configure do
- begin
- if ActiveRecord::Base.connection.tables.include?('jobs')
- check_enable_legacy_jobs_api
- end
- rescue ActiveRecord::NoDatabaseError
- # Database hasn't been created yet
+ if ActiveRecord::Base.connection.tables.include?('jobs')
+ check_enable_legacy_jobs_api
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list