[
https://issues.apache.org/jira/browse/BEAM-7746?focusedWorklogId=490501&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-490501
]
ASF GitHub Bot logged work on BEAM-7746:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Sep/20 00:50
Start Date: 25/Sep/20 00:50
Worklog Time Spent: 10m
Work Description: chadrik commented on a change in pull request #12881:
URL: https://github.com/apache/beam/pull/12881#discussion_r494687447
##########
File path: sdks/python/apache_beam/runners/worker/sdk_worker.py
##########
@@ -622,10 +659,12 @@ def process_bundle_progress_metadata_request(self,
request, # type:
beam_fn_api_pb2.ProcessBundleProgressMetadataRequest
instruction_id # type: str
):
+ # type: (...) -> beam_fn_api_pb2.InstructionResponse
return beam_fn_api_pb2.InstructionResponse(
instruction_id=instruction_id,
- process_bundle_progress=beam_fn_api_pb2.
+ process_bundle_progress_metadata=beam_fn_api_pb2.
ProcessBundleProgressMetadataResponse(
+ # FIXME: incompatible type "List[MonitoringInfo]"; expected
"Optional[Mapping[str, Any]]"
monitoring_info=SHORT_ID_CACHE.getInfos(
request.monitoring_info_id)))
Review comment:
Note this change and the FIXME. I'm not sure what to do about this.
I got complaints that `InstructionResponse(process_bundle_progress=...)` was
receiving the wrong type. I'm not sure whether this is the right resolution.
Also, `ProcessBundleProgressMetadataResponse(monitoring_info=...)`is also
receiving the wrong type. It's supposed to be a mapping not a list. Should I
change `SHORT_ID_CACHE.getInfos` to return a dictionary?
Do you know if this code is being hit? If so, any theories on how it's
working?
----------------------------------------------------------------
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: 490501)
Time Spent: 97h 50m (was: 97h 40m)
> Add type hints to python code
> -----------------------------
>
> Key: BEAM-7746
> URL: https://issues.apache.org/jira/browse/BEAM-7746
> Project: Beam
> Issue Type: New Feature
> Components: sdk-py-core
> Reporter: Chad Dombrova
> Priority: P3
> Time Spent: 97h 50m
> Remaining Estimate: 0h
>
> As a developer of the beam source code, I would like the code to use pep484
> type hints so that I can clearly see what types are required, get completion
> in my IDE, and enforce code correctness via a static analyzer like mypy.
> This may be considered a precursor to BEAM-7060
> Work has been started here: [https://github.com/apache/beam/pull/9056]
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)