From 712eb9ff91cde66af94e8381ec01ad512ed6d03c Mon Sep 17 00:00:00 2001 From: Naresh Date: Fri, 9 Mar 2018 11:37:18 +0000 Subject: [PATCH] Make logging after success in jobset more apparent tools/run_tests/artifacts/artifact_targets.py is used in the artifact build process to create the relevant jobset.JobSpec, but currently prints the console output only if the build fails. jobset.JobSpec has a verbose_success flag that is used to print the process output even if it ends in SUCCESS, but is currently not easily perceivable and is hard to find, making it very difficult to debug SUCCESS cases. Make the flag more apparent by adding it as parameters to jobspec creation methods in artifact_targets. --- tools/run_tests/artifacts/artifact_targets.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index 53c7e178d89..a2e0e27c546 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -31,7 +31,8 @@ def create_docker_jobspec(name, timeout_retries=0, timeout_seconds=30 * 60, docker_base_image=None, - extra_docker_args=None): + extra_docker_args=None, + verbose_success=False): """Creates jobspec for a task running under docker.""" environ = environ.copy() environ['RUN_COMMAND'] = shell_command @@ -57,7 +58,8 @@ def create_docker_jobspec(name, shortname='build_artifact.%s' % (name), timeout_seconds=timeout_seconds, flake_retries=flake_retries, - timeout_retries=timeout_retries) + timeout_retries=timeout_retries, + verbose_success=verbose_success) return jobspec @@ -69,7 +71,8 @@ def create_jobspec(name, timeout_retries=0, timeout_seconds=30 * 60, use_workspace=False, - cpu_cost=1.0): + cpu_cost=1.0, + verbose_success=False): """Creates jobspec.""" environ = environ.copy() if use_workspace: @@ -88,7 +91,8 @@ def create_jobspec(name, flake_retries=flake_retries, timeout_retries=timeout_retries, shell=shell, - cpu_cost=cpu_cost) + cpu_cost=cpu_cost, + verbose_success=verbose_success) return jobspec