You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by yi...@apache.org on 2021/12/07 22:07:29 UTC

[beam] branch master updated: [BEAM-13388] Fix broken google cloud dlp test.

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

yichi 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 f917eae  [BEAM-13388] Fix broken google cloud dlp test.
     new bf35182  Merge pull request #16142 from y1chi/BEAM-13388
f917eae is described below

commit f917eae0498bc878747e5d4e8484424e44f0daa4
Author: Yichi Zhang <zy...@google.com>
AuthorDate: Mon Dec 6 10:29:53 2021 -0800

    [BEAM-13388] Fix broken google cloud dlp test.
---
 sdks/python/apache_beam/ml/gcp/cloud_dlp.py      | 4 ++--
 sdks/python/apache_beam/ml/gcp/cloud_dlp_test.py | 4 ++--
 sdks/python/setup.py                             | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sdks/python/apache_beam/ml/gcp/cloud_dlp.py b/sdks/python/apache_beam/ml/gcp/cloud_dlp.py
index 93510c8..0b97c67 100644
--- a/sdks/python/apache_beam/ml/gcp/cloud_dlp.py
+++ b/sdks/python/apache_beam/ml/gcp/cloud_dlp.py
@@ -190,7 +190,7 @@ class _DeidentifyFn(DoFn):
       self.client = dlp_v2.DlpServiceClient()
     self.params = {
         'timeout': self.timeout,
-        'parent': self.client.project_path(self.project)
+        'parent': self.client.common_project_path(self.project)
     }
     self.params.update(self.config)
 
@@ -213,7 +213,7 @@ class _InspectFn(DoFn):
       self.client = dlp_v2.DlpServiceClient()
     self.params = {
         'timeout': self.timeout,
-        "parent": self.client.project_path(self.project)
+        "parent": self.client.common_project_path(self.project)
     }
     self.params.update(self.config)
 
diff --git a/sdks/python/apache_beam/ml/gcp/cloud_dlp_test.py b/sdks/python/apache_beam/ml/gcp/cloud_dlp_test.py
index 111e5be..b488ae0 100644
--- a/sdks/python/apache_beam/ml/gcp/cloud_dlp_test.py
+++ b/sdks/python/apache_beam/ml/gcp/cloud_dlp_test.py
@@ -64,7 +64,7 @@ class TestDeidentifyFn(unittest.TestCase):
         operation.item = item
         return operation
 
-      def project_path(self, *args):
+      def common_project_path(self, *args):
         return 'test'
 
     with mock.patch('google.cloud.dlp_v2.DlpServiceClient', ClientMock):
@@ -112,7 +112,7 @@ class TestDeidentifyFn(unittest.TestCase):
         operation.result.findings = [None]
         return operation
 
-      def project_path(self, *args):
+      def common_project_path(self, *args):
         return 'test'
 
     with mock.patch('google.cloud.dlp_v2.DlpServiceClient', ClientMock):
diff --git a/sdks/python/setup.py b/sdks/python/setup.py
index f9ae895..fc744f1 100644
--- a/sdks/python/setup.py
+++ b/sdks/python/setup.py
@@ -195,7 +195,7 @@ GCP_REQUIREMENTS = [
     'google-cloud-spanner>=1.13.0,<2',
     'grpcio-gcp>=0.2.2,<1',
     # GCP Packages required by ML functionality
-    'google-cloud-dlp>=0.12.0,<4',
+    'google-cloud-dlp>=3.3.1,<4',
     'google-cloud-language>=1.3.0,<2',
     'google-cloud-videointelligence>=1.8.0,<2',
     'google-cloud-vision>=0.38.0,<2',