[ARVADOS] updated: 5a55113805af906145449be18ec86b1a95a5017b
git at public.curoverse.com
git at public.curoverse.com
Fri Sep 25 10:38:49 EDT 2015
Summary of changes:
apps/workbench/config/application.default.yml | 47 ++++++++++++++++++++++++---
services/api/config/application.default.yml | 43 ++++++++++++++++++++++--
2 files changed, 84 insertions(+), 6 deletions(-)
via 5a55113805af906145449be18ec86b1a95a5017b (commit)
via 285c0092f8ae4d757e31754c91314baa4db5af44 (commit)
via 559dc0ac07ea3d6820f5e220b9f6faf850ae63bf (commit)
from 99349abd0ee7347b5bac3d4a9638853c6d4b97ab (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 5a55113805af906145449be18ec86b1a95a5017b
Merge: 99349ab 285c009
Author: Brett Smith <brett at curoverse.com>
Date: Fri Sep 25 10:38:37 2015 -0400
Merge branch '6967-application-yml-without-git-wip'
Closes #6967, #7375.
commit 285c0092f8ae4d757e31754c91314baa4db5af44
Author: Brett Smith <brett at curoverse.com>
Date: Wed Sep 23 11:38:06 2015 -0400
6967: Extend application.default.yml source_version detection.
* In production, get source_version from our package's
git-commit.version, assuming it's available.
* When we get source information from Git, suppress errors from the
user, and only use the information if all queries succeed.
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index c458a50..1650e12 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -1,6 +1,45 @@
# Do not use this file for site configuration. Create application.yml
# instead (see application.yml.example).
+<%
+# If you change any of the code in this block, you'll probably also want
+# to update it in API server's application.default.yml.
+def info_cmd(*args, &block)
+ IO.popen(args, "r", chdir: Rails.root, err: "/dev/null", &block)
+end
+
+source_version = ""
+local_modified = false
+if Rails.env == "production"
+ # Read the version from our package's git-commit.version file, if available.
+ begin
+ source_version = IO.read(Rails.root.join("git-commit.version")).strip
+ rescue Errno::ENOENT
+ end
+end
+
+if source_version.empty?
+ begin
+ status_output = false
+ info_cmd("git", "status", "-s") do |git_pipe|
+ git_pipe.each_line do |_|
+ status_output = true
+ # Continue reading the pipe so git doesn't get SIGPIPE.
+ end
+ end
+ if $?.success?
+ info_cmd("git", "log", "-n1", "--format=%H") do |git_pipe|
+ git_pipe.each_line do |line|
+ source_version = line.chomp
+ end
+ end
+ local_modified = status_output
+ end
+ rescue SystemCallError
+ end
+end
+%>
+
# Below is a sample setting for diagnostics testing.
# Configure workbench URL as "arvados_workbench_url"
# Configure test user tokens as "user_tokens".
@@ -45,7 +84,7 @@ development:
assets.debug: true
profiling_enabled: true
site_name: Arvados Workbench (dev)
- local_modified: "<%= '-modified' if `git status -s` != '' %>"
+ local_modified: "<%= local_modified ? '-modified' : '' %>"
# API server configuration
arvados_login_base: ~
@@ -184,7 +223,7 @@ common:
user_profile_form_message: Welcome to Arvados. All <span style="color:red">required fields</span> must be completed before you can proceed.
# source_version
- source_version: "<%= `git log -n 1 --format=%h`.strip %>"
+ source_version: "<%= source_version[0...8] %>"
local_modified: false
# report notification to and from addresses
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index 51bc4f9..a61420c 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -8,6 +8,45 @@
# 4. Section in application.default.yml corresponding to RAILS_ENV
# 5. Section in application.default.yml called "common"
+<%
+# If you change any of the code in this block, you'll probably also want
+# to update it in Workbench's application.default.yml.
+def info_cmd(*args, &block)
+ IO.popen(args, "r", chdir: Rails.root, err: "/dev/null", &block)
+end
+
+source_version = ""
+local_modified = false
+if Rails.env == "production"
+ # Read the version from our package's git-commit.version file, if available.
+ begin
+ source_version = IO.read(Rails.root.join("git-commit.version")).strip
+ rescue Errno::ENOENT
+ end
+end
+
+if source_version.empty?
+ begin
+ status_output = false
+ info_cmd("git", "status", "-s") do |git_pipe|
+ git_pipe.each_line do |_|
+ status_output = true
+ # Continue reading the pipe so git doesn't get SIGPIPE.
+ end
+ end
+ if $?.success?
+ info_cmd("git", "log", "-n1", "--format=%H") do |git_pipe|
+ git_pipe.each_line do |line|
+ source_version = line.chomp
+ end
+ end
+ local_modified = status_output
+ end
+ rescue SystemCallError
+ end
+end
+%>
+
common:
###
### Essential site configuration
@@ -327,7 +366,7 @@ common:
default_openid_prefix: https://www.google.com/accounts/o8/id
# source_version
- source_version: "<%= `git log -n 1 --format=%h`.strip %>"
+ source_version: "<%= source_version[0...8] %>"
local_modified: false
@@ -345,7 +384,7 @@ development:
active_record.auto_explain_threshold_in_seconds: 0.5
assets.compress: false
assets.debug: true
- local_modified: "<%= '-modified' if `git status -s` != '' %>"
+ local_modified: "<%= local_modified ? '-modified' : '' %>"
production:
force_ssl: true
commit 559dc0ac07ea3d6820f5e220b9f6faf850ae63bf
Author: Brett Smith <brett at curoverse.com>
Date: Wed Sep 23 11:34:53 2015 -0400
6967: Remove trailing whitespace in Workbench's application.default.yml.
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 744c0c3..c458a50 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -11,7 +11,7 @@
# template_uuid: is the uuid of the template to be executed
# input_paths: an array of inputs for the pipeline. Use either a collection's "uuid"
# or a file's "uuid/file_name" path in this array. If the pipeline does not require
-# any inputs, this can be omitted.
+# any inputs, this can be omitted.
# max_wait_seconds: max time in seconds to wait for the pipeline run to complete.
# Default value of 30 seconds is used when this value is not provided.
diagnostics:
@@ -151,7 +151,7 @@ common:
# Below is a sample setting of user_profile_form_fields config parameter.
# This configuration parameter should be set to either false (to disable) or
- # to an array as shown below.
+ # to an array as shown below.
# Configure the list of input fields to be displayed in the profile page
# using the attribute "key" for each of the input fields.
# This sample shows configuration with one required and one optional form fields.
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list