[ 
https://issues.apache.org/jira/browse/BEAM-7527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16866900#comment-16866900
 ] 

Mark Liu edited comment on BEAM-7527 at 6/18/19 6:10 PM:
---------------------------------------------------------

It makes beam_PerformanceTests_WordCountIT_Py27 consistently failed.

The gradle command this test executes is:
{code}
/home/jenkins/jenkins-slave/workspace/beam_PerformanceTests_WordCountIT_Py27/src/gradlew
 integrationTest 
-Dtests=apache_beam.examples.wordcount_it_test:WordCountIT.test_wordcount_it -p 
sdks/python -Dattr=IT -DpipelineOptions="--project=apache-beam-testing" 
"--staging_location=gs://temp-storage-for-end-to-end-tests/staging-it" 
"--temp_location=gs://temp-storage-for-end-to-end-tests/temp-it" 
"--input=gs://apache-beam-samples/input_small_files/ascii_sort_1MB_input.0000*" 
"--output=gs://temp-storage-for-end-to-end-tests/py-it-cloud/output" 
"--expect_checksum=ea0ca2e5ee4ea5f218790f28d0b9fe7d09d8d710" "--num_workers=10" 
"--autoscaling_algorithm=NONE" "--runner=TestDataflowRunner" 
"--sdk_location=build/apache-beam.tar.gz" --info --scan
{code}

It should run single test task (only in py27), but actually run few that 
includes multiple python versions:
{code}
05:19:23 Tasks to be executed: [task ':sdks:python:setupVirtualenv', task 
':sdks:python:sdist', task ':sdks:python:installGcpTest', task 
':sdks:python:integrationTest', task 
':sdks:python:test-suites:dataflow:py35:setupVirtualenv', task 
':sdks:python:test-suites:dataflow:py35:sdist', task 
':sdks:python:test-suites:dataflow:py35:installGcpTest', task 
':sdks:python:test-suites:dataflow:py35:integrationTest', task 
':sdks:python:test-suites:dataflow:py36:setupVirtualenv', task 
':sdks:python:test-suites:dataflow:py36:sdist', task 
':sdks:python:test-suites:dataflow:py36:installGcpTest', task 
':sdks:python:test-suites:dataflow:py36:integrationTest', task 
':sdks:python:test-suites:dataflow:py37:setupVirtualenv', task 
':sdks:python:test-suites:dataflow:py37:sdist', task 
':sdks:python:test-suites:dataflow:py37:installGcpTest', task 
':sdks:python:test-suites:dataflow:py37:integrationTest']
{code} 

Probably some changes happened in gradle scripts. I'll keep investigate on that.


was (Author: markflyhigh):
It makes beam_PerformanceTests_WordCountIT_Py27 consistently failed.

The gradle command this test executes is:
{code}
/home/jenkins/jenkins-slave/workspace/beam_PerformanceTests_WordCountIT_Py27/src/gradlew
 integrationTest 
-Dtests=apache_beam.examples.wordcount_it_test:WordCountIT.test_wordcount_it -p 
sdks/python -Dattr=IT -DpipelineOptions="--project=apache-beam-testing" 
"--staging_location=gs://temp-storage-for-end-to-end-tests/staging-it" 
"--temp_location=gs://temp-storage-for-end-to-end-tests/temp-it" 
"--input=gs://apache-beam-samples/input_small_files/ascii_sort_1MB_input.0000*" 
"--output=gs://temp-storage-for-end-to-end-tests/py-it-cloud/output" 
"--expect_checksum=ea0ca2e5ee4ea5f218790f28d0b9fe7d09d8d710" "--num_workers=10" 
"--autoscaling_algorithm=NONE" "--runner=TestDataflowRunner" 
"--sdk_location=build/apache-beam.tar.gz" --info --scan
{code}

It should only run single test WordcountIT in py27, but actually run test in 
multiple python versions:
{code}
05:19:23 Tasks to be executed: [task ':sdks:python:setupVirtualenv', task 
':sdks:python:sdist', task ':sdks:python:installGcpTest', task 
':sdks:python:integrationTest', task 
':sdks:python:test-suites:dataflow:py35:setupVirtualenv', task 
':sdks:python:test-suites:dataflow:py35:sdist', task 
':sdks:python:test-suites:dataflow:py35:installGcpTest', task 
':sdks:python:test-suites:dataflow:py35:integrationTest', task 
':sdks:python:test-suites:dataflow:py36:setupVirtualenv', task 
':sdks:python:test-suites:dataflow:py36:sdist', task 
':sdks:python:test-suites:dataflow:py36:installGcpTest', task 
':sdks:python:test-suites:dataflow:py36:integrationTest', task 
':sdks:python:test-suites:dataflow:py37:setupVirtualenv', task 
':sdks:python:test-suites:dataflow:py37:sdist', task 
':sdks:python:test-suites:dataflow:py37:installGcpTest', task 
':sdks:python:test-suites:dataflow:py37:integrationTest']
{code} 

Probably some changes happened in gradle scripts. I'll keep investigate on that.

> Beam Python integration test suites are flaky: ModuleNotFoundError
> ------------------------------------------------------------------
>
>                 Key: BEAM-7527
>                 URL: https://issues.apache.org/jira/browse/BEAM-7527
>             Project: Beam
>          Issue Type: Bug
>          Components: test-failures
>            Reporter: Valentyn Tymofieiev
>            Assignee: Mark Liu
>            Priority: Major
>
> I am seeing several errors in Python SDK Integration test suites, such as 
> Dataflow ValidatesRunner and Python PostCommit that fail due to one of the 
> autogenerated files not being found.
> For example:
> {noformat}
> /home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/__init__.py:84:
>  UserWarning: Running the Apache Beam SDK on Python 3 is not yet fully 
> supported. You may encounter buggy behavior or missing features.
>   'Running the Apache Beam SDK on Python 3 is not yet fully supported. '
> Failure: ModuleNotFoundError (No module named 'beam_runner_api_pb2') ... 
> ERROR
> ======================================================================
> ERROR: Failure: ModuleNotFoundError (No module named 'beam_runner_api_pb2')
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/site-packages/nose/failure.py",
>  line 39, in runTest
>     raise self.exc_val.with_traceback(self.tb)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/site-packages/nose/loader.py",
>  line 418, in loadTestsFromName
>     addr.filename, addr.module)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/site-packages/nose/importer.py",
>  line 47, in importFromPath
>     return self.importFromDir(dir_path, fqname)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/site-packages/nose/importer.py",
>  line 94, in importFromDir
>     mod = load_module(part_fqname, fh, filename, desc)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/imp.py",
>  line 245, in load_module
>     return load_package(name, filename)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/imp.py",
>  line 217, in load_package
>     return _load(spec)
>   File "<frozen importlib._bootstrap>", line 684, in _load
>   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
>   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
>   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/__init__.py",
>  line 97, in <module>
>     from apache_beam import coders
>   File "/home/jenkins/jenkins-slave/workspace/beam_Pos
> tCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/coders/__init__.py", line 
> 19, in <module>
>     from apache_beam.coders.coders import *
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/coders/coders.py",
>  line 32, in <module>
>     from apache_beam.coders import coder_impl
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/coders/coder_impl.py",
>  line 44, in <module>
>     from apache_beam.utils import windowed_value
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/utils/windowed_value.py",
>  line 34, in <module>
>     from apache_beam.utils.timestamp import MAX_TIMESTAMP
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/utils/timestamp.py",
>  line 34, in <module>
>     from apache_beam.portability import common_urns
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/portability/common_urns.py",
>  line 25, in <module>
>     from apache_beam.portability.api import metrics_pb2
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/portability/api/metrics_pb2.py",
>  line 16, in <module>
>     import beam_runner_api_pb2 as beam__runner__api__pb2
> ModuleNotFoundError: No module named 'beam_runner_api_pb2'
> {noformat}
> {noformat}
> /home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/__init__.py:84:
>  UserWarning: Running the Apache Beam SDK on Python 3 is not yet fully 
> supported. You may encounter buggy behavior or missing features.
>   'Running the Apache Beam SDK on Python 3 is not yet fully supported. '
> Failure: ModuleNotFoundError (No module named 'endpoints_pb2') ... 
> ERROR
> ======================================================================
> ERROR: Failure: ModuleNotFoundError (No module named 'endpoints_pb2')
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/site-packages/nose/failure.py",
>  line 39, in runTest
>     raise self.exc_val.with_traceback(self.tb)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/site-packages/nose/loader.py",
>  line 418, in loadTestsFromName
>     addr.filename, addr.module)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/site-packages/nose/importer.py",
>  line 47, in importFromPath
>     return self.importFromDir(dir_path, fqname)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/site-packages/nose/importer.py",
>  line 94, in importFromDir
>     mod = load_module(part_fqname, fh, filename, desc)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/imp.py",
>  line 245, in load_module
>     return load_package(name, filename)
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/build/gradleenv/-1734967053/lib/python3.6/imp.py",
>  line 217, in load_package
>     return _load(spec)
>   File "<frozen importlib._bootstrap>", line 684, in _load
>   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
>   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
>   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/__init__.py",
>  line 97, in <module>
>     from apache_beam import coders
>   File "/home/jenkins/jenkins-slave/workspace/beam_PostCommi
> t_Py_VR_Dataflow/src/sdks/python/apache_beam/coders/__init__.py", line 19, in 
> <module>
>     from apache_beam.coders.coders import *
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/coders/coders.py",
>  line 32, in <module>
>     from apache_beam.coders import coder_impl
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/coders/coder_impl.py",
>  line 44, in <module>
>     from apache_beam.utils import windowed_value
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/utils/windowed_value.py",
>  line 34, in <module>
>     from apache_beam.utils.timestamp import MAX_TIMESTAMP
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/utils/timestamp.py",
>  line 34, in <module>
>     from apache_beam.portability import common_urns
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/portability/common_urns.py",
>  line 24, in <module>
>     from apache_beam.portability.api import beam_runner_api_pb2
>   File 
> "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Py_VR_Dataflow/src/sdks/python/apache_beam/portability/api/beam_runner_api_pb2.py",
>  line 16, in <module>
>     import endpoints_pb2 as endpoints__pb2
> ModuleNotFoundError: No module named 'endpoints_pb2'
> {noformat}
> The rootcause is not clear, I suspect that it may be related to the way we 
> parallelize execution of Python test suites for 2.7, 3.5, 3.6, 3.7.
> cc: [~altay] [~markflyhigh] [~Juta] [~frederik]



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

Reply via email to