You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ro...@apache.org on 2016/07/26 04:11:41 UTC

[1/3] incubator-beam git commit: Fix SDK name and version sent to the Cloud Dataflow service

Repository: incubator-beam
Updated Branches:
  refs/heads/python-sdk 153916fe9 -> 26ff65795


Fix SDK name and version sent to the Cloud Dataflow service


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/8a7bc71d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/8a7bc71d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/8a7bc71d

Branch: refs/heads/python-sdk
Commit: 8a7bc71dee1e3f9f17c29e5e558870a6bc5f4880
Parents: 38d9dea
Author: Charles Chen <cc...@google.com>
Authored: Mon Jul 25 18:22:08 2016 -0700
Committer: Charles Chen <cc...@google.com>
Committed: Mon Jul 25 18:22:08 2016 -0700

----------------------------------------------------------------------
 sdks/python/apache_beam/internal/apiclient.py |  6 +++---
 sdks/python/apache_beam/utils/dependency.py   | 11 +++++++++++
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/8a7bc71d/sdks/python/apache_beam/internal/apiclient.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/internal/apiclient.py b/sdks/python/apache_beam/internal/apiclient.py
index 363b8e1..137a40b 100644
--- a/sdks/python/apache_beam/internal/apiclient.py
+++ b/sdks/python/apache_beam/internal/apiclient.py
@@ -29,7 +29,6 @@ from apitools.base.py import encoding
 from apitools.base.py import exceptions
 
 from apache_beam import utils
-from apache_beam import version
 from apache_beam.internal import pickler
 from apache_beam.internal.auth import get_service_credentials
 from apache_beam.internal.json_value import to_json_value
@@ -39,6 +38,7 @@ from apache_beam.utils import dependency
 from apache_beam.utils import names
 from apache_beam.utils import retry
 from apache_beam.utils.dependency import get_required_container_version
+from apache_beam.utils.dependency import get_sdk_name_and_version
 from apache_beam.utils.names import PropertyNames
 from apache_beam.utils.options import GoogleCloudOptions
 from apache_beam.utils.options import StandardOptions
@@ -191,12 +191,12 @@ class Environment(object):
     self.proto.userAgent = dataflow.Environment.UserAgentValue()
     self.local = 'localhost' in self.google_cloud_options.dataflow_endpoint
 
-    version_string = version.__version__
+    sdk_name, version_string = get_sdk_name_and_version()
 
     self.proto.userAgent.additionalProperties.extend([
         dataflow.Environment.UserAgentValue.AdditionalProperty(
             key='name',
-            value=to_json_value('Google Cloud Dataflow SDK for Python')),
+            value=to_json_value(sdk_name)),
         dataflow.Environment.UserAgentValue.AdditionalProperty(
             key='version', value=to_json_value(version_string))])
     # Version information.

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/8a7bc71d/sdks/python/apache_beam/utils/dependency.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/utils/dependency.py b/sdks/python/apache_beam/utils/dependency.py
index b809cf2..d8e0036 100644
--- a/sdks/python/apache_beam/utils/dependency.py
+++ b/sdks/python/apache_beam/utils/dependency.py
@@ -59,6 +59,7 @@ import tempfile
 
 
 from apache_beam import utils
+from apache_beam import version as beam_version
 from apache_beam.internal import pickler
 from apache_beam.utils import names
 from apache_beam.utils import processes
@@ -437,6 +438,16 @@ def get_required_container_version():
     return 'beamhead'
 
 
+def get_sdk_name_and_version():
+  """Returns the name and version of the SDK reported to Cloud Dataflow."""
+  # TODO(ccy): Make this check cleaner.
+  container_version = get_required_container_version()
+  if container_version == 'beamhead':
+    return ('Apache Beam SDK for Python', beam_version.__version__)
+  else:
+    return ('Google Cloud Dataflow SDK for Python', container_version)
+
+
 def _download_pypi_sdk_package(temp_dir):
   """Downloads SDK package from PyPI and returns path to local path."""
   # TODO(silviuc): Handle apache-beam versions when we have official releases.


[3/3] incubator-beam git commit: Closes #730

Posted by ro...@apache.org.
Closes #730


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/26ff6579
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/26ff6579
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/26ff6579

Branch: refs/heads/python-sdk
Commit: 26ff6579531d598e91b220fa21ec9bd7f9220f78
Parents: 153916f 76f3864
Author: Robert Bradshaw <ro...@gmail.com>
Authored: Mon Jul 25 21:11:31 2016 -0700
Committer: Robert Bradshaw <ro...@gmail.com>
Committed: Mon Jul 25 21:11:31 2016 -0700

----------------------------------------------------------------------
 sdks/python/apache_beam/internal/apiclient.py |  6 +++---
 sdks/python/apache_beam/utils/dependency.py   | 12 ++++++++++++
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[2/3] incubator-beam git commit: Update docstring.

Posted by ro...@apache.org.
Update docstring.


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/76f3864b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/76f3864b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/76f3864b

Branch: refs/heads/python-sdk
Commit: 76f3864b61ad9e2ac9a2e81e7a0d5993db5fde6c
Parents: 8a7bc71
Author: Charles Chen <cc...@google.com>
Authored: Mon Jul 25 18:36:45 2016 -0700
Committer: Charles Chen <cc...@google.com>
Committed: Mon Jul 25 18:36:45 2016 -0700

----------------------------------------------------------------------
 sdks/python/apache_beam/utils/dependency.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/76f3864b/sdks/python/apache_beam/utils/dependency.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/utils/dependency.py b/sdks/python/apache_beam/utils/dependency.py
index d8e0036..7d1ae41 100644
--- a/sdks/python/apache_beam/utils/dependency.py
+++ b/sdks/python/apache_beam/utils/dependency.py
@@ -1,3 +1,4 @@
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -439,7 +440,7 @@ def get_required_container_version():
 
 
 def get_sdk_name_and_version():
-  """Returns the name and version of the SDK reported to Cloud Dataflow."""
+  """Returns name and version of SDK reported to Google Cloud Dataflow."""
   # TODO(ccy): Make this check cleaner.
   container_version = get_required_container_version()
   if container_version == 'beamhead':