[
https://issues.apache.org/jira/browse/BEAM-3072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16803172#comment-16803172
]
niklas Hansson edited comment on BEAM-3072 at 3/27/19 6:17 PM:
---------------------------------------------------------------
In order to get the output from the error message a possible solution(as far as
I understand) would be to replace:
subprocess.check_call()
with something in line with
import subprocess
import traceback
try:
subprocess.check_call(["lls","l"],shell=True)
except subprocess.CalledProcessError as e:
tb = traceback.format_exc()
raise RuntimeError(tb)
However by setting shell=True makes it more vulnerable if the user gives input.
Do you see that this will be a problem in this case? Thanks for the feedback.
was (Author: nikenano):
In order to get the output from the error message a possible solution(as far as
I understand) would be to replace:
subprocess.check_call()
with something in line with
import subprocess
import traceback
try:
subprocess.check_call(["lls","l"],shell=True)
except subprocess.CalledProcessError as e:
tb = traceback.format_exc()
raise RuntimeError(tb)
However by setting shell=True makes it more vulnerable if the user gives input.
Do you see that this will be a problem in this case? Thanks for the feedback.
> Improve error handling at staging time time for DataflowRunner
> --------------------------------------------------------------
>
> Key: BEAM-3072
> URL: https://issues.apache.org/jira/browse/BEAM-3072
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Ahmet Altay
> Assignee: niklas Hansson
> Priority: Minor
> Labels: starter, triaged
>
> dependency.py calls out to external process to collect dependencies:
> https://github.com/apache/beam/blob/de7cc05cc67d1aa6331cddc17c2e02ed0efbe37d/sdks/python/apache_beam/runners/dataflow/internal/dependency.py#L263
> If these calls fails, the error is not clear. The error only tells what
> failed but does not show the actual error message, and is not helpful for
> users.
> As a general fix processes.py should have general better output collection
> from failed processes.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)