[ARVADOS] updated: cd698336f2b7aebe78517993e0b3b07b45c16c87

Git user git at public.curoverse.com
Fri Jul 21 11:17:38 EDT 2017


Summary of changes:
 apps/workbench/config/application.default.yml |  5 +++--
 apps/workbench/config/load_config.rb          | 11 +++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

       via  cd698336f2b7aebe78517993e0b3b07b45c16c87 (commit)
      from  f291a43f7154d634a417bff32b9b81c197feb461 (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 cd698336f2b7aebe78517993e0b3b07b45c16c87
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Fri Jul 21 12:15:08 2017 -0300

    11167: Refuse to start when keep-web isn't configured.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at curoverse.com>

diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 6998b17..9d0419c 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -99,6 +99,7 @@ test:
   profiling_enabled: true
   secret_token: <%= rand(2**256).to_s(36) %>
   secret_key_base: <%= rand(2**256).to_s(36) %>
+  keep_web_url: http://example/c=%{uuid_or_pdh}
 
   # When you run the Workbench's integration tests, it starts the API
   # server as a dependency.  These settings should match the API
@@ -243,8 +244,8 @@ common:
   shell_in_a_box_url: false
 
   # Format of preview links. If false, use keep_web_download_url
-  # instead, and disable inline preview. If both are false, use
-  # Workbench's built-in file download/preview mechanism.
+  # instead, and disable inline preview.
+  # If both are false, Workbench won't start, this is a mandatory configuration.
   #
   # Examples:
   # keep_web_url: https://%{uuid_or_pdh}.collections.uuid_prefix.arvadosapi.com
diff --git a/apps/workbench/config/load_config.rb b/apps/workbench/config/load_config.rb
index e2185a8..441a437 100644
--- a/apps/workbench/config/load_config.rb
+++ b/apps/workbench/config/load_config.rb
@@ -56,4 +56,15 @@ config/application.yml:
 
 EOS
   end
+  # Refuse to start if keep-web isn't configured
+  if not (config.keep_web_url or config.keep_web_download_url)
+    raise <<EOS
+Refusing to start in #{::Rails.env.to_s} mode with missing configuration.
+
+Keep-web service must be configured in config/application.yml:
+* keep_web_url
+* keep_web_download_url
+
+EOS
+  end
 end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list