You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dian Fu (Jira)" <ji...@apache.org> on 2019/11/26 02:05:00 UTC
[jira] [Created] (FLINK-14944) Unstable test
FlinkFnExecutionSyncTests.test_flink_fn_execution_pb2_synced
Dian Fu created FLINK-14944:
-------------------------------
Summary: Unstable test FlinkFnExecutionSyncTests.test_flink_fn_execution_pb2_synced
Key: FLINK-14944
URL: https://issues.apache.org/jira/browse/FLINK-14944
Project: Flink
Issue Type: Bug
Components: API / Python
Affects Versions: 1.10.0
Reporter: Dian Fu
Fix For: 1.10.0
This tests failed occasionally:
{code:java}
force = 'True', output_dir = '/tmp/tmpkh6rmeig'
def generate_proto_files(force=True, output_dir=DEFAULT_PYTHON_OUTPUT_PATH):
try:
import grpc_tools # noqa # pylint: disable=unused-import
except ImportError:
warnings.warn('Installing grpcio-tools is recommended for development.')
proto_dirs = [os.path.join(PYFLINK_ROOT_PATH, path) for path in PROTO_PATHS]
proto_files = sum(
[glob.glob(os.path.join(d, '*.proto')) for d in proto_dirs], [])
out_dir = os.path.join(PYFLINK_ROOT_PATH, output_dir)
out_files = [path for path in glob.glob(os.path.join(out_dir, '*_pb2.py'))]
if out_files and not proto_files and not force:
# We have out_files but no protos; assume they're up to date.
# This is actually the common case (e.g. installation from an sdist).
logging.info('No proto files; using existing generated files.')
return
elif not out_files and not proto_files:
raise RuntimeError(
'No proto files found in %s.' % proto_dirs)
# Regenerate iff the proto files or this file are newer.
elif force or not out_files or len(out_files) < len(proto_files) or (
min(os.path.getmtime(path) for path in out_files)
<= max(os.path.getmtime(path)
for path in proto_files + [os.path.realpath(__file__)])):
try:
> from grpc_tools import protoc
E ModuleNotFoundError: No module named 'grpc_tools'
pyflink/gen_protos.py:70: ModuleNotFoundError
During handling of the above exception, another exception occurred:
self = <pyflink.fn_execution.tests.test_flink_fn_execution_pb2_synced.FlinkFnExecutionSyncTests testMethod=test_flink_fn_execution_pb2_synced>
def test_flink_fn_execution_pb2_synced(self):
> generate_proto_files('True', self.tempdir)
pyflink/fn_execution/tests/test_flink_fn_execution_pb2_synced.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyflink/gen_protos.py:83: in generate_proto_files
target=_install_grpcio_tools_and_generate_proto_files(force, output_dir))
pyflink/gen_protos.py:131: in _install_grpcio_tools_and_generate_proto_files
'--upgrade', GRPC_TOOLS, "-I"])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = (['/home/travis/build/apache/flink/flink-python/.tox/py36/bin/python', '-m', 'pip', 'install', '--prefix', '/home/travis/build/apache/flink/flink-python/pyflink/../.eggs/grpcio-wheels', ...],)
kwargs = {}, retcode = 2
cmd = ['/home/travis/build/apache/flink/flink-python/.tox/py36/bin/python', '-m', 'pip', 'install', '--prefix', '/home/travis/build/apache/flink/flink-python/pyflink/../.eggs/grpcio-wheels', ...]
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the call function. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '['/home/travis/build/apache/flink/flink-python/.tox/py36/bin/python', '-m', 'pip', 'install', '--prefix', '/home/travis/build/apache/flink/flink-python/pyflink/../.eggs/grpcio-wheels', '--build', '/home/travis/build/apache/flink/flink-python/pyflink/../.eggs/grpcio-wheels-build', '--upgrade', 'grpcio-tools>=1.3.5,<=1.14.2', '-I']' returned non-zero exit status 2.
dev/.conda/envs/3.6/lib/python3.6/subprocess.py:311: CalledProcessError
{code}
instance: [https://api.travis-ci.org/v3/job/616685590/log.txt]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)