[
https://issues.apache.org/jira/browse/BEAM-6280?focusedWorklogId=182087&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-182087
]
ASF GitHub Bot logged work on BEAM-6280:
----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Jan/19 00:41
Start Date: 08/Jan/19 00:41
Worklog Time Spent: 10m
Work Description: rohdesamuel commented on pull request #7433:
[BEAM-6280] Refactors Python portability tests to be multi-threaded aware
URL: https://github.com/apache/beam/pull/7433
The local_job_service.py module was too complex and had a number of
multi-threaded issues. One of the issue was that the Get(Message|State)Stream
methods did not guarantee the consumer would see all message/state transitions.
Another issue was a data race between messages and state transitions. In the
test the PortableRunner would try and wait for any last messages. However,
there was a race between receiving the message and the PortableRunner waiting
for a terminal state. What might have happened was a job transition into a
terminal state and the consumer would not receive the message, failing the test.
Note: I wasn't able to repro the bug on my local machine but did my best to
zero in on any multi-threading issues. There may be follow-up PRs to fix the
issue if it pops up again.
------------------------
Follow this checklist to help us incorporate your contribution quickly and
easily:
- [x] Format the pull request title like `[BEAM-XXX] Fixes bug in
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA
issue, if applicable. This will automatically link the pull request to the
issue.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
It will help us expedite review of your Pull Request if you tag someone
(e.g. `@username`) to look at it.
Post-Commit Tests Status (on master branch)
------------------------------------------------------------------------------------------------
Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
--- | --- | --- | --- | --- | --- | --- | ---
Go | [](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/)
| --- | --- | --- | --- | --- | ---
Java | [](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)<br>[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)
Python | [](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/)
| --- | [](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)
</br> [](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/)
| --- | --- | ---
----------------------------------------------------------------
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: 182087)
Time Spent: 10m
Remaining Estimate: 0h
> Failure in PortableRunnerTest.test_error_traceback_includes_user_code
> ---------------------------------------------------------------------
>
> Key: BEAM-6280
> URL: https://issues.apache.org/jira/browse/BEAM-6280
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core, test-failures
> Reporter: Kenneth Knowles
> Assignee: Sam Rohde
> Priority: Critical
> Labels: flaky-test
> Time Spent: 10m
> Remaining Estimate: 0h
>
> [https://builds.apache.org/job/beam_PreCommit_Python_Cron/732/]
> [https://builds.apache.org/job/beam_PreCommit_Python_Cron/732/testReport/apache_beam.runners.portability.portable_runner_test/PortableRunnerTest/test_error_traceback_includes_user_code/]
> [https://scans.gradle.com/s/do3hjulee3gaa/console-log?task=:beam-sdks-python:testPython3]
> {code:java}
> 'second' not found in 'Traceback (most recent call last):\n File
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Cron/src/sdks/python/apache_beam/runners/portability/fn_api_runner_test.py",
> line 466, in test_error_traceback_includes_user_code\n p |
> beam.Create([0]) | beam.Map(first) # pylint:
> disable=expression-not-assigned\n File
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Cron/src/sdks/python/apache_beam/pipeline.py",
> line 425, in __exit__\n self.run().wait_until_finish()\n File
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Cron/src/sdks/python/apache_beam/runners/portability/portable_runner.py",
> line 314, in wait_until_finish\n self._job_id, self._state,
> self._last_error_message()))\nRuntimeError: Pipeline
> job-cdcefe6d-1caa-4487-9e63-e971f67ec68c failed in state FAILED: start
> <DataInputOperation receivers=[ConsumerSet[Create/Read/Impulse.out0,
> coder=WindowedValueCoder[BytesCoder], len(consumers)=1]]>\n'{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)