beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhalp...@apache.org
Subject [2/2] incubator-beam git commit: Allow Google Cloud Dataflow workflows to use ".dev" workers
Date Mon, 22 Aug 2016 21:11:57 GMT
Allow Google Cloud Dataflow workflows to use ".dev" workers


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

Branch: refs/heads/python-sdk
Commit: c8b4bf15c1405e152bb9e0b2e52971d4e471474c
Parents: b9a4b6a
Author: Charles Chen <ccy@google.com>
Authored: Mon Aug 22 10:08:01 2016 -0700
Committer: Dan Halperin <dhalperi@google.com>
Committed: Mon Aug 22 14:11:44 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/c8b4bf15/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 aacaf90..9585887 100644
--- a/sdks/python/apache_beam/utils/dependency.py
+++ b/sdks/python/apache_beam/utils/dependency.py
@@ -55,6 +55,7 @@ TODO(silviuc): We should allow customizing the exact command for setup build.
 import glob
 import logging
 import os
+import re
 import shutil
 import tempfile
 
@@ -431,7 +432,11 @@ def get_required_container_version():
     version = pkg.get_distribution(GOOGLE_PACKAGE_NAME).version
     # We drop any pre/post parts of the version and we keep only the X.Y.Z
     # format.  For instance the 0.3.0rc2 SDK version translates into 0.3.0.
-    return '%s.%s.%s' % pkg.parse_version(version)._version.release
+    container_version = '%s.%s.%s' % pkg.parse_version(version)._version.release
+    # We do, however, keep the ".dev" suffix if it is present.
+    if re.match(r'.*\.dev[0-9]*$', version):
+      container_version += '.dev'
+    return container_version
   except pkg.DistributionNotFound:
     # This case covers Apache Beam end-to-end testing scenarios. All these tests
     # will run with a special container version.


Mime
View raw message