shunping commented on issue #27326:
URL: https://github.com/apache/beam/issues/27326#issuecomment-1904901550

   I talked to the team in charge of google-cloud-storage python library. They 
mentioned that they have put all the feature requests on the batch module on 
hold since there is a new API for batch operation under development in GCS. 
   
   This is both good news and bad news for us. On one hand, this means that for 
a little while we won't see any changes in this module so the way we 
referencing the private member variable will still work. On the other, when the 
new API is ready, it is very likely to introduce breaking changes.
   
   I have already informed them to let us know when it happens, but at this 
moment, we don't have any action item.
   
   Notice that, an alternative to get rid of referencing the private member 
variable is to do a hack as follows:
   ```
   responses  = None
   current_batch = self.client.batch(raise_exception=False)
   with current_batch:
      # call and put batch operations in queue
      # ...
      # call finish to get the responses
      responses = current_batch.finish(raise_exception=False)
      # throw a blank exception so finish() will not be triggered when exiting 
the with statement.
      raise Exception("nothing wrong, just exiting with w/o calling finish()")
   ```
   
   I don't think we will go with this hack given the incoming change on the 
batch module.
   


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