[
https://issues.apache.org/jira/browse/BEAM-7824?focusedWorklogId=284808&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-284808
]
ASF GitHub Bot logged work on BEAM-7824:
----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Jul/19 09:24
Start Date: 30/Jul/19 09:24
Worklog Time Spent: 10m
Work Description: robertwb commented on pull request #9165: [BEAM-7824]
Sets a default environment for Dataflow runner
URL: https://github.com/apache/beam/pull/9165#discussion_r308620307
##########
File path: sdks/python/apache_beam/transforms/core.py
##########
@@ -308,14 +308,19 @@ class RunnerAPIPTransformHolder(PTransform):
without a serialized Python `DoFn` object.
"""
- def __init__(self, proto):
+ def __init__(self, proto, context):
self._proto = proto
+ self._context = context
def proto(self):
"""Runner API payload for a `PTransform`"""
return self._proto
def to_runner_api(self, context, has_parts=False):
+ id_to_proto_map = self._context.environments.get_id_to_proto_map()
Review comment:
This seems a bit fragile in that we're assuming that if the ids match, the
protos match (which could be bad for auto-generated names like env0). Could you
add a check for this.
It also seems that we're copying too much (every environment from the
context, not just the one(s) referenced from this proto), but perhaps there's
no good way to get around that. Could you at least add a TODO referencing the
JIRA about making environment a top-level attribute of transforms?
----------------------------------------------------------------
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: 284808)
Time Spent: 2h (was: 1h 50m)
> Set a default environment for Python SDK jobs for Dataflow runner
> -----------------------------------------------------------------
>
> Key: BEAM-7824
> URL: https://issues.apache.org/jira/browse/BEAM-7824
> Project: Beam
> Issue Type: Bug
> Components: runner-dataflow, sdk-py-core
> Reporter: Chamikara Jayalath
> Assignee: Chamikara Jayalath
> Priority: Major
> Time Spent: 2h
> Remaining Estimate: 0h
>
> Currently default environment is set to empty. We should change the default
> environment to urn: beam:env:docker:v1 and payload to a DockerPayload where
> container_image is set to container image used by Dataflow.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)