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

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

                Author: ASF GitHub Bot
            Created on: 27/Jan/22 00:54
            Start Date: 27/Jan/22 00:54
    Worklog Time Spent: 10m 
      Work Description: VictorPlusC commented on a change in pull request 
#16601:
URL: https://github.com/apache/beam/pull/16601#discussion_r793170745



##########
File path: 
sdks/python/apache_beam/runners/interactive/interactive_environment.py
##########
@@ -675,3 +683,25 @@ def get_sql_chain(self, pipeline, set_user_pipeline=False):
             pipeline)
       chain.user_pipeline = pipeline
     return chain
+
+  def check_bucket_exists(self, bucket_name):
+    try:
+      from apitools.base.py.exceptions import HttpError
+    except:
+      raise ImportError('Could not import HttpError from apitools.')

Review comment:
       Noted, thanks! I've moved the import to the top of utils.py and I've 
renamed the function to `assert_bucket_exists`.
   
   In this case, I only raise a ValueError if the bucket cannot be found. In 
the scenario where the user may not be able to verify whether the bucket exists 
or not, I do not currently raise any exceptions so that the user could 
potentially still continue.
   
   What are your thoughts on this approach?




-- 
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]


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

    Worklog Id:     (was: 716129)
    Time Spent: 6.5h  (was: 6h 20m)

> Support cache directories that use GCS buckets
> ----------------------------------------------
>
>                 Key: BEAM-13734
>                 URL: https://issues.apache.org/jira/browse/BEAM-13734
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-py-interactive
>            Reporter: Victor Chen
>            Assignee: Victor Chen
>            Priority: P2
>          Time Spent: 6.5h
>  Remaining Estimate: 0h
>
> * Builds off of the work accomplished under BEAM-13685
>  * Modified interactive_environment.py to support caching to a bucket on GCS 
> for batch processing pipelines
>  * If a specified bucket does not exist, the pipeline will terminate and 
> return an error specifying that the bucket does not exist
>  * Added cleanup() functionality to cache_manager.py, to enable the 
> FileBasedCacheManager class to automatically delete cached values on GCS when 
> a bucket path is specified
>  * Added docstring to interactive_beam.py with an example of GCS path 
> assignment
>  * Cached files on GCS will be stored under a directory represented by the 
> value of id(pipeline).
>  ** Example cached path: gs://my-gcs-bucket/cache/dir/id(pipeline)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to