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

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

                Author: ASF GitHub Bot
            Created on: 20/Dec/19 18:05
            Start Date: 20/Dec/19 18:05
    Worklog Time Spent: 10m 
      Work Description: udim commented on pull request #10389: [BEAM-8974] Wait 
for log messages to be processed before checking them.
URL: https://github.com/apache/beam/pull/10389#discussion_r360499578
 
 

 ##########
 File path: sdks/python/apache_beam/runners/worker/log_handler.py
 ##########
 @@ -162,7 +162,7 @@ def _read_log_control_messages(self):
     # This case is unlikely and the chance of reconnection and successful
     # transmission of logs is also very less as the process is terminating.
     # I choose not to handle this case to avoid un-necessary code complexity.
-    while self._alive:
+    while True:
 
 Review comment:
   My suggestion for easier readability (take it or leave it):
   ```py
   alive = True  # Force at least one connection attempt.
   while alive:
     ...
     alive = self._alive
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: 361767)
    Time Spent: 20m  (was: 10m)

> apache_beam.runners.worker.log_handler_test.FnApiLogRecordHandlerTest.test_exc_info
>  is flaky
> --------------------------------------------------------------------------------------------
>
>                 Key: BEAM-8974
>                 URL: https://issues.apache.org/jira/browse/BEAM-8974
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-harness
>            Reporter: Valentyn Tymofieiev
>            Assignee: Robert Bradshaw
>            Priority: Major
>             Fix For: 2.18.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The test is failing at apache_beam/runners/worker/log_handler_test.py:110: 
> IndexError
> Added in https://github.com/apache/beam/pull/10292
> Sample job: [https://builds.apache.org/job/beam_PreCommit_Python_Cron/2160/]
> Console logs:
>  {noformat}
> 06:37:37 =================================== FAILURES 
> ===================================
> 06:37:37 ___________________ FnApiLogRecordHandlerTest.test_exc_info 
> ____________________
> 06:37:37 [gw1] linux2 -- Python 2.7.12 
> /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Cron/src/sdks/python/test-suites/tox/py2/build/srcs/sdks/python/target/.tox-py27-gcp-pytest/py27-gcp-pytest/bin/python
> 06:37:37
> 06:37:37 self = 
> <apache_beam.runners.worker.log_handler_test.FnApiLogRecordHandlerTest 
> testMethod=test_exc_info>
> 06:37:37
> 06:37:37     def test_exc_info(self):
> 06:37:37       try:
> 06:37:37         raise ValueError('some message')
> 06:37:37       except ValueError:
> 06:37:37         _LOGGER.error('some error', exc_info=True)
> 06:37:37
> 06:37:37       self.fn_log_handler.close()
> 06:37:37
> 06:37:37 >     log_entry = 
> self.test_logging_service.log_records_received[0].log_entries[0]
> 06:37:37 E     IndexError: list index out of range
> 06:37:37
> 06:37:37 apache_beam/runners/worker/log_handler_test.py:110: IndexError
> 06:37:37 ----------------------------- Captured stderr call 
> -----------------------------
> 06:37:37 ERROR:apache_beam.runners.worker.log_handler_test:some error
> 06:37:37 Traceback (most recent call last):
> 06:37:37   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Cron/src/sdks/python/test-suites/tox/py2/build/srcs/sdks/python/apache_beam/runners/worker/log_handler_test.py",
>  line 104, in test_exc_info
> 06:37:37     raise ValueError('some message')
> 06:37:37 ValueError: some message
> 06:37:37 ------------------------------ Captured log call 
> -------------------------------
> 06:37:37 ERROR    
> apache_beam.runners.worker.log_handler_test:log_handler_test.py:106 some error
> 06:37:37 Traceback (most recent call last):
> 06:37:37   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Cron/src/sdks/python/test-suites/tox/py2/build/srcs/sdks/python/apache_beam/runners/worker/log_handler_test.py",
>  line 104, in test_exc_info
> 06:37:37     raise ValueError('some message')
> 06:37:37 ValueError: some message
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to