r-spatial / rgee

Google Earth Engine for R
https://r-spatial.github.io/rgee/
Other
677 stars 146 forks source link

add `predefinedAcl` option to `*_as_ee` and `local_to_gcs` #202

Closed jsocolar closed 2 years ago

jsocolar commented 2 years ago

As far as I can tell, *_as_ee will fail whenever the GCS bucket is set up with uniform bucket-level access. Note that uniform bucket-level access is now the default suggested by GCS when creating a new bucket.

This seems to be related to this issue https://github.com/cloudyr/googleCloudStorageR/issues/111

Presumably, it is fixable by creating a predefinedAcl argument that is passed through to googleCloudStorageR::gcs_upload.

I can try to submit a patch, but first want to check in about the design: The proposed design is to add a predefinedAcl argument to *_as_ee and to local_to_gcs, and then to write *_as_ee to pass the argument through to local_to_gcs, and to write local_to_gcs to pass the argument through to googleCloudStorageR::gcs_upload. I've searched the rgee codebase on github, and the only appearance of gcs_upload is within local_to_gcs, and then the only important appearances of local_to_gcs are within *_as_ee.

@csaybar does that look ok to you?

csaybar commented 2 years ago

@jsocolar thank you so much for reporting!.

Note that uniform bucket-level access is now the default suggested by GCS when creating a new bucket.

U right! it was a big mistake does not to specify how the users will control access of buckets and objects (now I understand why so many issues related to local_to_gcs). Please I will be very grateful if you can make a PR with this :)