[
https://issues.apache.org/jira/browse/BEAM-3072?focusedWorklogId=228792&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-228792
]
ASF GitHub Bot logged work on BEAM-3072:
----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Apr/19 03:16
Start Date: 17/Apr/19 03:16
Worklog Time Spent: 10m
Work Description: tvalentyn commented on pull request #8158: [BEAM-3072]
updates to that the error handling and collected the fail…
URL: https://github.com/apache/beam/pull/8158#discussion_r276065934
##########
File path: sdks/python/apache_beam/utils/processes_test.py
##########
@@ -103,5 +104,124 @@ def test_method_forwarding_windows(self, *unused_mocks):
other_arg=True)
+class TestErrorHandlingCheckCall(unittest.TestCase):
+ @classmethod
+ def setup_class(cls):
+ cls.mock_get_patcher = mock.patch(\
+ 'apache_beam.utils.processes.subprocess.check_call')
+ cls.mock_get = cls.mock_get_patcher.start()
+
+ @classmethod
+ def teardown_class(cls):
+ cls.mock_get_patcher.stop()
+
+ def test_oserror_check_call(self):
Review comment:
These tests fail for me when run with
```
python ./setup.py test -s
apache_beam.utils.processes_test.TestErrorHandlingCheckOutput
```
```
======================================================================
ERROR: test_oserror_check_output_message
(apache_beam.utils.processes_test.TestErrorHandlingCheckOutput)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/local/home/projects/beam/beam/beam/sdks/python/apache_beam/utils/processes_test.py",
line 162, in test_oserror_check_output_message
self.mock_get.side_effect = OSError()
AttributeError: 'TestErrorHandlingCheckOutput' object has no attribute
'mock_get'
```
I think the reason is that `setup_class` is never called.
But the tests pass when run inside tox suite: `tox -e py27`.
Looking further to understand why.
----------------------------------------------------------------
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: 228792)
Time Spent: 4h 50m (was: 4h 40m)
> 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
> Time Spent: 4h 50m
> Remaining Estimate: 0h
>
> 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)