shunping commented on code in PR #34996:
URL: https://github.com/apache/beam/pull/34996#discussion_r2121136586


##########
sdks/go/pkg/beam/util/gcsx/gcs.go:
##########
@@ -63,6 +63,24 @@ func Upload(ctx context.Context, client *storage.Client, 
project, bucket, object
 
 }
 
+var getBucketAttrs = func(ctx context.Context, bucketName string) 
(*storage.BucketAttrs, error) {
+       client, err := storage.NewClient(ctx)

Review Comment:
   Shall we follow the same pattern as other apis in this file to accept a 
client as a function parameter rather than creating one inside? 
   
   Then in `checkSoftDeletePolicyEnabled` in `dataflow.go`, you have a choice 
to create a new storage client or use an existing one if any.



-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to