You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2020/04/03 01:57:11 UTC

[beam] branch master updated: [BEAM-9677] Fix path -> url typo in ArtifactUrlPayload

This is an automated email from the ASF dual-hosted git repository.

lcwik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e95d5e  [BEAM-9677] Fix path -> url typo in ArtifactUrlPayload
     new e6b37c4  Merge pull request #11294 from lukecwik/beam9677
3e95d5e is described below

commit 3e95d5ee541e635eba0b88bd1d3dea1031f5163f
Author: Luke Cwik <lc...@google.com>
AuthorDate: Thu Apr 2 10:46:38 2020 -0700

    [BEAM-9677] Fix path -> url typo in ArtifactUrlPayload
    
    We can regenerate go protos once it is necessary since Go SDK doesn't consume this yet.
---
 model/pipeline/src/main/proto/beam_runner_api.proto                  | 2 +-
 sdks/python/apache_beam/runners/portability/artifact_service.py      | 2 +-
 sdks/python/apache_beam/runners/portability/artifact_service_test.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/model/pipeline/src/main/proto/beam_runner_api.proto b/model/pipeline/src/main/proto/beam_runner_api.proto
index 17229d2..960d615 100644
--- a/model/pipeline/src/main/proto/beam_runner_api.proto
+++ b/model/pipeline/src/main/proto/beam_runner_api.proto
@@ -1171,7 +1171,7 @@ message ArtifactFilePayload {
 
 message ArtifactUrlPayload {
   // a string for an artifact URL e.g. "https://.../foo.jar" or "gs://tmp/foo.jar"
-  string path = 1;
+  string url = 1;
 }
 
 message EmbeddedFilePayload {
diff --git a/sdks/python/apache_beam/runners/portability/artifact_service.py b/sdks/python/apache_beam/runners/portability/artifact_service.py
index 597e693..3dd4f13 100644
--- a/sdks/python/apache_beam/runners/portability/artifact_service.py
+++ b/sdks/python/apache_beam/runners/portability/artifact_service.py
@@ -345,7 +345,7 @@ class ArtifactRetrievalService(
       payload = proto_utils.parse_Bytes(
           request.artifact.type_payload, beam_runner_api_pb2.ArtifactUrlPayload)
       # TODO(Py3): Remove the unneeded contextlib wrapper.
-      read_handle = contextlib.closing(urlopen(payload.path))
+      read_handle = contextlib.closing(urlopen(payload.url))
     elif request.artifact.type_urn == common_urns.artifact_types.EMBEDDED.urn:
       payload = proto_utils.parse_Bytes(
           request.artifact.type_payload,
diff --git a/sdks/python/apache_beam/runners/portability/artifact_service_test.py b/sdks/python/apache_beam/runners/portability/artifact_service_test.py
index 42424cb..9d60ac4 100644
--- a/sdks/python/apache_beam/runners/portability/artifact_service_test.py
+++ b/sdks/python/apache_beam/runners/portability/artifact_service_test.py
@@ -327,7 +327,7 @@ class ArtifactServiceTest(unittest.TestCase):
     url_dep = beam_runner_api_pb2.ArtifactInformation(
         type_urn=common_urns.artifact_types.URL.urn,
         type_payload=beam_runner_api_pb2.ArtifactUrlPayload(
-            path='file://' + __file__).SerializeToString())
+            url='file://' + __file__).SerializeToString())
     content = b''.join([
         r.data for r in retrieval_service.GetArtifact(
             beam_artifact_api_pb2.GetArtifactRequest(artifact=url_dep))