mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-26 14:15:49 +03:00
[GH-ISSUE #72] Copy file from bucket to bucket is not supported #15
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AvihayTsayeg on GitHub (Aug 25, 2019).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/72
Hi,
Thx for the fake gcs server.
When trying to copy file from one bucket to another I got this error.
I'm using python API google-cloud-storage==1.18.0
source_bucket.copy_blob(remote_file, to_bucket, target_gcs_path)Regards, Avihay
@fsouza commented on GitHub (Aug 25, 2019):
Hi @AvihayTsayeg, thanks for the detailed report!
Indeed that's not supported at the moment, but I'll see if I can find some time to add it later today or this week.
@fsouza commented on GitHub (Aug 25, 2019):
(in the meantime, you should probably be able to get away with
rewrite:github.com/googleapis/google-cloud-python@3d29c750b5/storage/google/cloud/storage/blob.py (L1530))The Go SDK actually replaced copyTo with rewriteTo, but I'm not sure why. I'll still work on adding copyTo to fake-gcs-server.
@AvihayTsayeg commented on GitHub (Aug 26, 2019):
@fsouza
Thank you very much
@Szasza commented on GitHub (Apr 30, 2020):
@fsouza Thank you for maintaining this library, it is much appreciated.
I would like to ask if this feature will be added soon. My use-case would be to use multiple buckets for simulating ETL pipelines locally using Airflow (Cloud Composer in GCP) while not having to pay for a k8s cluster and whatnot in GCP, where this feature is a missing piece.
Can work around it if needed, just asking.
Thank you.
@fsouza commented on GitHub (Apr 30, 2020):
@Szasza hi there. Thanks for pinging me, to be honest I had forgotten about this issue 🙈 The reason I didn't implement right away is because fake-gcs-server's test suite uses the Go SDK and the Go SDK doesn't support copying files with copyTo, I think, so I was lazy to implement a more sophisticated test 😁
I currently don't have any plans on implementing this feature, but I can take a look before the end of this week and check what it would take to implement/properly test it.
Do you think you could use the alternative
rewriteAPI instead, since it's already supported: https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite (you can see the relationship between copy and rewrite in copy's docs: https://cloud.google.com/storage/docs/json_api/v1/objects/copy)@Szasza commented on GitHub (Apr 30, 2020):
@fsouza Thank you for the quick response, much appreciated.
Yes, can do, no problem.