[ 
https://issues.apache.org/jira/browse/BEAM-3453?focusedWorklogId=381344&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-381344
 ]

ASF GitHub Bot logged work on BEAM-3453:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Feb/20 02:50
            Start Date: 04/Feb/20 02:50
    Worklog Time Spent: 10m 
      Work Description: angoenka commented on pull request #10762: [BEAM-3453] 
Use default project when creating pubsub subscription
URL: https://github.com/apache/beam/pull/10762#discussion_r374449591
 
 

 ##########
 File path: sdks/python/apache_beam/runners/direct/transform_evaluator.py
 ##########
 @@ -499,13 +499,21 @@ def __init__(self, evaluation_context, 
applied_ptransform,
     if self.source.id_label:
       raise NotImplementedError(
           'DirectRunner: id_label is not supported for PubSub reads')
+
+    import google.auth
+
+    _, sub_project = google.auth.default()
 
 Review comment:
   Beam has this pipeline option, project which is generally used to specify 
project explicitly. Asking user explicitly for resource avoid surprises. Shall 
we use it. 
https://github.com/apache/beam/blob/40c2be03303d7c37cabfae4d4da6258a2ce33579/sdks/python/apache_beam/options/pipeline_options.py#L473
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 381344)
    Time Spent: 0.5h  (was: 20m)

> Allow usage of public Google PubSub topics in Python DirectRunner
> -----------------------------------------------------------------
>
>                 Key: BEAM-3453
>                 URL: https://issues.apache.org/jira/browse/BEAM-3453
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-py-core
>    Affects Versions: 2.2.0
>            Reporter: Charles Chen
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently, the Beam Python DirectRunner does not allow the usage of data from 
> public Google Cloud PubSub topics.  We should allow this functionality so 
> that users can more easily test Beam Python's streaming functionality.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to