[ARVADOS] updated: 1.3.0-780-g709cd2fae

Git user git at public.curoverse.com
Mon Apr 22 17:39:51 UTC 2019


Summary of changes:
 services/api/app/controllers/application_controller.rb | 4 ++--
 services/api/app/controllers/static_controller.rb      | 2 +-
 services/api/config/arvados_config.rb                  | 9 +++++++++
 3 files changed, 12 insertions(+), 3 deletions(-)

       via  709cd2fae63636240ea82cf695e5d59ecf147487 (commit)
       via  a9cf56b43597176492620313a503b6dfa37495f0 (commit)
      from  d89411bb37c884e60ee14e590407d1856fe1d770 (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 709cd2fae63636240ea82cf695e5d59ecf147487
Merge: d89411bb3 a9cf56b43
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Mon Apr 22 13:38:14 2019 -0400

    Merge branch '15119-api-config-fixes'
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
    
    refs #13996
    refs #15119


commit a9cf56b43597176492620313a503b6dfa37495f0
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Mon Apr 22 13:33:58 2019 -0400

    15119: Fixes for Workbench1.ExternalURL and Controller.ExternalURL
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb
index e1cb1ba8e..77e3c75af 100644
--- a/services/api/app/controllers/application_controller.rb
+++ b/services/api/app/controllers/application_controller.rb
@@ -81,8 +81,8 @@ class ApplicationController < ActionController::Base
 
   def default_url_options
     options = {}
-    if Rails.configuration.Services.Controller.ExternalURL != ""
-      exturl = URI.parse(Rails.configuration.Services.Controller.ExternalURL)
+    if Rails.configuration.Services.Controller.ExternalURL != URI("")
+      exturl = Rails.configuration.Services.Controller.ExternalURL
       options[:host] = exturl.host
       options[:port] = exturl.port
       options[:protocol] = exturl.scheme
diff --git a/services/api/app/controllers/static_controller.rb b/services/api/app/controllers/static_controller.rb
index 736557787..4b2b985e0 100644
--- a/services/api/app/controllers/static_controller.rb
+++ b/services/api/app/controllers/static_controller.rb
@@ -13,7 +13,7 @@ class StaticController < ApplicationController
     respond_to do |f|
       f.html do
         if !Rails.configuration.Services.Workbench1.ExternalURL.to_s.empty?
-          redirect_to Rails.configuration.Services.Workbench1.ExternalURL
+          redirect_to Rails.configuration.Services.Workbench1.ExternalURL.to_s
         else
           render_not_found "Oops, this is an API endpoint. You probably want to point your browser to an Arvados Workbench site instead."
         end
diff --git a/services/api/config/arvados_config.rb b/services/api/config/arvados_config.rb
index cde8acf23..669beb16e 100644
--- a/services/api/config/arvados_config.rb
+++ b/services/api/config/arvados_config.rb
@@ -141,6 +141,7 @@ arvcfg.declare_config "Containers.JobsAPI.ReuseJobIfOutputsDiffer", Boolean, :re
 arvcfg.declare_config "Containers.JobsAPI.DefaultDockerImage", String, :default_docker_image_for_jobs
 arvcfg.declare_config "Mail.MailchimpAPIKey", String, :mailchimp_api_key
 arvcfg.declare_config "Mail.MailchimpListID", String, :mailchimp_list_id
+arvcfg.declare_config "Services.Controller.ExternalURL", URI
 arvcfg.declare_config "Services.Workbench1.ExternalURL", URI, :workbench_address
 arvcfg.declare_config "Services.Websocket.ExternalURL", URI, :websocket_address
 arvcfg.declare_config "Services.WebDAV.ExternalURL", URI, :keep_web_service_url
@@ -205,6 +206,14 @@ if application_config[:auto_activate_users_from]
   end
 end
 
+if application_config[:host] || application_config[:port] || application_config[:scheme]
+  if !application_config[:host] || application_config[:host].empty?
+    raise "Must set 'host' when setting 'port' or 'scheme'"
+  end
+  $arvados_config.Services["Controller"]["ExternalURL"] = URI((application_config[:scheme] || "https")+"://"+application_config[:host]+
+                                                              (if application_config[:port] then ":#{application_config[:port]}" else "" end))
+end
+
 # Checks for wrongly typed configuration items, coerces properties
 # into correct types (such as Duration), and optionally raise error
 # for essential configuration that can't be empty.

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list