[ARVADOS] updated: 1.3.0-2300-g7bbb0940b

Git user git at public.arvados.org
Thu Feb 27 16:21:35 UTC 2020


Summary of changes:
 apps/workbench/config/application.rb | 2 +-
 lib/boot/passenger.go                | 2 +-
 lib/boot/seed.go                     | 2 +-
 sdk/python/tests/run_test_server.py  | 1 +
 services/api/config/application.rb   | 2 +-
 5 files changed, 5 insertions(+), 4 deletions(-)

       via  7bbb0940b0398d17bb85fe410c3f23e4cd6ec8d6 (commit)
      from  162db4b03e17b449144bc259e3296f56681cfe7c (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 7bbb0940b0398d17bb85fe410c3f23e4cd6ec8d6
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Thu Feb 27 11:19:28 2020 -0500

    15954: Don't send copious "rake test" logs to stdout.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/apps/workbench/config/application.rb b/apps/workbench/config/application.rb
index 2d331c70a..e88229b85 100644
--- a/apps/workbench/config/application.rb
+++ b/apps/workbench/config/application.rb
@@ -19,7 +19,7 @@ require "rails/test_unit/railtie"
 
 Bundler.require(:default, Rails.env)
 
-if Rails.env == 'test'
+if ENV["ARVADOS_RAILS_LOG_TO_STDOUT"]
   Rails.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
 end
 
diff --git a/lib/boot/passenger.go b/lib/boot/passenger.go
index 7ebb36e47..41805ba2b 100644
--- a/lib/boot/passenger.go
+++ b/lib/boot/passenger.go
@@ -107,7 +107,7 @@ func (runner runPassenger) Run(ctx context.Context, fail func(error), super *Sup
 	super.waitShutdown.Add(1)
 	go func() {
 		defer super.waitShutdown.Done()
-		err = super.RunProgram(ctx, runner.src, nil, nil, "bundle", "exec",
+		err = super.RunProgram(ctx, runner.src, nil, []string{"ARVADOS_RAILS_LOG_TO_STDOUT=1"}, "bundle", "exec",
 			"passenger", "start",
 			"-p", port,
 			"--log-file", "/dev/stderr",
diff --git a/lib/boot/seed.go b/lib/boot/seed.go
index 650c83688..ce5d296bd 100644
--- a/lib/boot/seed.go
+++ b/lib/boot/seed.go
@@ -20,7 +20,7 @@ func (seedDatabase) Run(ctx context.Context, fail func(error), super *Supervisor
 	if err != nil {
 		return err
 	}
-	err = super.RunProgram(ctx, "services/api", nil, nil, "bundle", "exec", "rake", "db:setup")
+	err = super.RunProgram(ctx, "services/api", nil, []string{"ARVADOS_RAILS_LOG_TO_STDOUT=1"}, "bundle", "exec", "rake", "db:setup")
 	if err != nil {
 		return err
 	}
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index bca372ccd..41334292d 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -321,6 +321,7 @@ def run(leave_running_atexit=False):
     port = internal_port_from_config("RailsAPI")
     env = os.environ.copy()
     env['RAILS_ENV'] = 'test'
+    env['ARVADOS_RAILS_LOG_TO_STDOUT'] = '1'
     env.pop('ARVADOS_WEBSOCKETS', None)
     env.pop('ARVADOS_TEST_API_HOST', None)
     env.pop('ARVADOS_API_HOST', None)
diff --git a/services/api/config/application.rb b/services/api/config/application.rb
index 7901a7fd8..b6174a0d8 100644
--- a/services/api/config/application.rb
+++ b/services/api/config/application.rb
@@ -40,7 +40,7 @@ if defined?(Bundler)
   end
 end
 
-if Rails.env == 'test'
+if ENV["ARVADOS_RAILS_LOG_TO_STDOUT"]
   Rails.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
 end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list