eantyshev commented on code in PR #23088:
URL: https://github.com/apache/beam/pull/23088#discussion_r990315986


##########
playground/infrastructure/datastore_client.py:
##########
@@ -45,23 +45,28 @@ def __str__(self):
 # Google Datastore documentation link: 
https://cloud.google.com/datastore/docs/concepts
 class DatastoreClient:
     """DatastoreClient is a datastore client for sending a request to the 
Google."""
+    _datastore_client: datastore.Client
 
     def __init__(self):
         self._check_envs()
-        self._datastore_client = 
datastore.Client(namespace=DatastoreProps.NAMESPACE, 
project=Config.GOOGLE_CLOUD_PROJECT)
+        self._datastore_client = datastore.Client(
+            namespace=DatastoreProps.NAMESPACE,
+            project=Config.GOOGLE_CLOUD_PROJECT
+        )
 
     def _check_envs(self):
         if Config.GOOGLE_CLOUD_PROJECT is None:
             raise KeyError("GOOGLE_CLOUD_PROJECT environment variable should 
be specified in os")
         if Config.SDK_CONFIG is None:
             raise KeyError("SDK_CONFIG environment variable should be 
specified in os")
 
-    def save_to_cloud_datastore(self, examples_from_rep: List[Example], sdk: 
Sdk):
+    def save_to_cloud_datastore(self, examples_from_rep: List[Example], sdk: 
Sdk, origin: Origin):
         """
         Save examples, output and meta to datastore
         Args:
-            :param sdk: sdk from parameters
             :param examples_from_rep: examples from the repository for saving 
to the Cloud Datastore
+            :param sdk: sdk from parameters
+            :param origin: typed origin const PG_EXAMPLES | TB_EXAMPLES

Review Comment:
   This component should be agnostic to other possible origins, as it operates 
with only examples from a project tree
   If we enable other origins, it would be possible to set them and get 
unpredictable results.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to