From 85d5a4d60903d182ab38b02e9bacb2cb57675c70 Mon Sep 17 00:00:00 2001 From: David Kale Date: Fri, 17 Jan 2020 13:57:08 -0500 Subject: [PATCH 1/2] Trace javascript action exit code instead of user logs --- src/Runner.Worker/Handlers/NodeScriptActionHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index 911265e3c75..0484b78af6f 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -122,9 +122,9 @@ public async Task RunAsync(ActionRunStage stage) else { var exitCode = await step; + Trace.Info($"Node Action run completed with exit code {exitCode}"); if (exitCode != 0) { - ExecutionContext.Error($"Node run failed with exit code {exitCode}"); ExecutionContext.Result = TaskResult.Failed; } } From 54674b1452879eed7b0c9fc9a478ade04cbf297b Mon Sep 17 00:00:00 2001 From: David Kale Date: Fri, 17 Jan 2020 14:34:30 -0500 Subject: [PATCH 2/2] Debug instead of trace --- src/Runner.Worker/Handlers/ContainerActionHandler.cs | 2 +- src/Runner.Worker/Handlers/NodeScriptActionHandler.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Runner.Worker/Handlers/ContainerActionHandler.cs b/src/Runner.Worker/Handlers/ContainerActionHandler.cs index bcd539469ca..a623da9688f 100644 --- a/src/Runner.Worker/Handlers/ContainerActionHandler.cs +++ b/src/Runner.Worker/Handlers/ContainerActionHandler.cs @@ -193,9 +193,9 @@ public async Task RunAsync(ActionRunStage stage) using (var stderrManager = new OutputManager(ExecutionContext, ActionCommandManager, container)) { var runExitCode = await dockerManger.DockerRun(ExecutionContext, container, stdoutManager.OnDataReceived, stderrManager.OnDataReceived); + ExecutionContext.Debug($"Docker Action run completed with exit code {runExitCode}"); if (runExitCode != 0) { - ExecutionContext.Error($"Docker run failed with exit code {runExitCode}"); ExecutionContext.Result = TaskResult.Failed; } } diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index 0484b78af6f..fb3b15448aa 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -122,7 +122,7 @@ public async Task RunAsync(ActionRunStage stage) else { var exitCode = await step; - Trace.Info($"Node Action run completed with exit code {exitCode}"); + ExecutionContext.Debug($"Node Action run completed with exit code {exitCode}"); if (exitCode != 0) { ExecutionContext.Result = TaskResult.Failed;