[ 
https://issues.apache.org/jira/browse/BEAM-5218?focusedWorklogId=138583&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-138583
 ]

ASF GitHub Bot logged work on BEAM-5218:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Aug/18 22:32
            Start Date: 27/Aug/18 22:32
    Worklog Time Spent: 10m 
      Work Description: tweise closed pull request #6234: [BEAM-5218] Set test 
name in the pipeline name
URL: https://github.com/apache/beam/pull/6234
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/sdks/python/apache_beam/runners/portability/portable_runner_test.py 
b/sdks/python/apache_beam/runners/portability/portable_runner_test.py
index edd981c9d98..0a406bce3c7 100644
--- a/sdks/python/apache_beam/runners/portability/portable_runner_test.py
+++ b/sdks/python/apache_beam/runners/portability/portable_runner_test.py
@@ -17,6 +17,7 @@
 from __future__ import absolute_import
 from __future__ import print_function
 
+import inspect
 import logging
 import platform
 import signal
@@ -149,7 +150,16 @@ def _maybe_kill_subprocess(cls):
       time.sleep(0.1)
 
   def create_options(self):
-    options = PipelineOptions()
+    def get_pipeline_name():
+      for _, _, _, method_name, _, _ in inspect.stack():
+        if method_name.find('test') != -1:
+          return method_name
+      return 'unknown_test'
+
+    # Set the job name for better debugging.
+    options = PipelineOptions.from_dictionary({
+        'job_name': get_pipeline_name() + '_' + str(time.time())
+    })
     options.view_as(PortableOptions).job_endpoint = self._get_job_endpoint()
     return options
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 138583)
    Time Spent: 0.5h  (was: 20m)

> Add the portable test name to the pipeline name for easy debugging 
> -------------------------------------------------------------------
>
>                 Key: BEAM-5218
>                 URL: https://issues.apache.org/jira/browse/BEAM-5218
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Ankur Goenka
>            Assignee: Ankur Goenka
>            Priority: Trivial
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> [https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/portability/portable_runner_test.py]
>  launches job for each test.
> The job names are generic and hard to match to a test case.
> Adding test case name to the job name will make it easy to identify 
> corresponding test cases and debug,\.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to