[ 
https://issues.apache.org/jira/browse/BEAM-3883?focusedWorklogId=102715&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-102715
 ]

ASF GitHub Bot logged work on BEAM-3883:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/May/18 23:46
            Start Date: 16/May/18 23:46
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on a change in pull request #5251: 
[BEAM-3883] Refactor and clean dependency.py to make it reusable with artifact 
service
URL: https://github.com/apache/beam/pull/5251#discussion_r188796621
 
 

 ##########
 File path: sdks/python/apache_beam/runners/portability/stager.py
 ##########
 @@ -130,19 +99,43 @@ def _download_file(self, from_url, to_path):
       except Exception:
         logging.info('Failed to download Artifact from %s', from_url)
         raise
+    elif from_url.startswith('gs://') or to_path.startswith('gs://'):
+      from apache_beam.io.gcp import gcsio
+      if from_url.startswith('gs://') and to_path.startswith('gs://'):
+        # Both files are GCS files so copy.
+        gcsio.GcsIO().copy(from_url, to_path)
+      elif to_path.startswith('gs://'):
 
 Review comment:
   Echoing my comment from previous interation: we only use this method for 
downloads into local folder. So the part that uploads to GCS would be dead 
code, let's remove it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 102715)

> Python SDK stages artifacts when talking to job server
> ------------------------------------------------------
>
>                 Key: BEAM-3883
>                 URL: https://issues.apache.org/jira/browse/BEAM-3883
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Ben Sidhom
>            Assignee: Ankur Goenka
>            Priority: Major
>          Time Spent: 12h 10m
>  Remaining Estimate: 0h
>
> The Python SDK does not currently stage its user-defined functions or 
> dependencies when talking to the job API. Artifacts that need to be staged 
> include the user code itself, any SDK components not included in the 
> container image, and the list of Python packages that must be installed at 
> runtime.
>  
> Artifacts that are currently expected can be found in the harness boot code: 
> [https://github.com/apache/beam/blob/58e3b06bee7378d2d8db1c8dd534b415864f63e1/sdks/python/container/boot.go#L52.]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to