tvalentyn commented on a change in pull request #14730:
URL: https://github.com/apache/beam/pull/14730#discussion_r630430104
##########
File path: sdks/python/apache_beam/runners/worker/data_plane.py
##########
@@ -639,6 +640,13 @@ def create_data_channel(self, remote_grpc_port):
"""Returns a ``DataChannel`` from the given RemoteGrpcPort."""
raise NotImplementedError(type(self))
+ @abc.abstractmethod
+ def create_data_channel_from_url(self, remote_grpc_port):
Review comment:
s/remote_grpc_port/url
##########
File path: sdks/python/apache_beam/runners/worker/data_plane.py
##########
@@ -464,7 +464,8 @@ def input_elements(self,
return
if self._exc_info:
t, v, tb = self._exc_info
- raise t(v).with_traceback(tb)
+ if t and v and tb:
Review comment:
One option to simplify this could be to initialize _exc_info differently:
```
self._exc_info = (None, None, None) # type: OptExcInfo
...
if t:
...
```
This way we omit the `if self._exc_info` condition, and mypy passes.
##########
File path: sdks/python/apache_beam/runners/worker/sdk_worker.py
##########
@@ -73,16 +68,11 @@
from apache_beam.runners.worker.worker_status import FnApiWorkerStatusHandler
from apache_beam.runners.worker.worker_status import thread_dump
from apache_beam.utils import thread_pool_executor
+from apache_beam.utils.profiler import Profile # pylint: disable=unused-import
from apache_beam.utils.sentinel import Sentinel
-if TYPE_CHECKING:
- # TODO(BEAM-9372): move this out of the TYPE_CHECKING scope when we drop
Review comment:
I don't fully understand the rationale for this TODO. Should lines 84-85
be better kept within the TODO to avoid disable=unused import statements?
--
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]