Эх сурвалжийг харах

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.
Naresh 7 жил өмнө
parent
commit
712eb9ff91

+ 8 - 4
tools/run_tests/artifacts/artifact_targets.py

@@ -31,7 +31,8 @@ def create_docker_jobspec(name,
                           timeout_retries=0,
                           timeout_retries=0,
                           timeout_seconds=30 * 60,
                           timeout_seconds=30 * 60,
                           docker_base_image=None,
                           docker_base_image=None,
-                          extra_docker_args=None):
+                          extra_docker_args=None,
+                          verbose_success=False):
     """Creates jobspec for a task running under docker."""
     """Creates jobspec for a task running under docker."""
     environ = environ.copy()
     environ = environ.copy()
     environ['RUN_COMMAND'] = shell_command
     environ['RUN_COMMAND'] = shell_command
@@ -57,7 +58,8 @@ def create_docker_jobspec(name,
         shortname='build_artifact.%s' % (name),
         shortname='build_artifact.%s' % (name),
         timeout_seconds=timeout_seconds,
         timeout_seconds=timeout_seconds,
         flake_retries=flake_retries,
         flake_retries=flake_retries,
-        timeout_retries=timeout_retries)
+        timeout_retries=timeout_retries,
+        verbose_success=verbose_success)
     return jobspec
     return jobspec
 
 
 
 
@@ -69,7 +71,8 @@ def create_jobspec(name,
                    timeout_retries=0,
                    timeout_retries=0,
                    timeout_seconds=30 * 60,
                    timeout_seconds=30 * 60,
                    use_workspace=False,
                    use_workspace=False,
-                   cpu_cost=1.0):
+                   cpu_cost=1.0,
+                   verbose_success=False):
     """Creates jobspec."""
     """Creates jobspec."""
     environ = environ.copy()
     environ = environ.copy()
     if use_workspace:
     if use_workspace:
@@ -88,7 +91,8 @@ def create_jobspec(name,
         flake_retries=flake_retries,
         flake_retries=flake_retries,
         timeout_retries=timeout_retries,
         timeout_retries=timeout_retries,
         shell=shell,
         shell=shell,
-        cpu_cost=cpu_cost)
+        cpu_cost=cpu_cost,
+        verbose_success=verbose_success)
     return jobspec
     return jobspec