mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[GH-ISSUE #1405] Feature request: support v2 storage API #195
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#195
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 @erikvanoosten on GitHub (Nov 23, 2023).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1405
Currently this project seems to support only the v1 grpc API.
https://github.com/googleapis/googleapis/blob/master/google/storage/v1/README.md states:
Please support the v2 grpc api.
@erikvanoosten commented on GitHub (Nov 24, 2023):
I found out that this feature request doesn't make sense yet. The GRPC api is not publicaly available yet.
@sonnysideup commented on GitHub (Dec 16, 2024):
https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest#hdr-gRPC_API
It is now generally available.
@peterebden commented on GitHub (Aug 6, 2025):
I had a look at this - we'd ideally like to be able to use the gRPC API and test with this server. It doesn't seem really possible to implement outside Google yet - there is one in genproto/googleapis with a warning not to use it, but even if you ignore that (as I did) it fails at runtime due to being also registered in an internal package of cloud.google.com. You can work around this with the normal proto conflict stuff but that's all pretty ugly.
It does seem strange that the Go client (at least, possibly others) is apparently using the v2 API (and as far as I can tell has no option to use the V1), and as noted above the V1 API is supposedly turned down, and yet the v2 API is still locked up privately like this. I hope Google will eventually change this...
@robreinhard commented on GitHub (Sep 16, 2025):
https://github.com/googleapis/google-cloud-go/issues/11163 <-- tracking issue for Google related to @peterebden's comment above.
@tritone commented on GitHub (Sep 16, 2025):
One note, the GCS Go client does still use the v1 JSON API by default when initialized with
storage.NewClient. You have to useNewGRPCClientto the get the v2 gRPC API. We don't plan on changing the default anytime soon (though gRPC will be required for certain new features).@peterebden commented on GitHub (Sep 22, 2025):
Yep, understood. Sorry I wasn't particularly clear earlier - I meant that if you use
NewGRPCClientthen the Go client uses the v2 gRPC API, as opposed to the v1 gRPC API which this server currently supports - but I think has been turned down upstream and none of the clients use it.When constructed with
NewClient, it uses the XML API (per WithJSONReads) which does seem to have a few advantages. From what I've heard, the gRPC API is preferable to either so it'd be nice to be able to move to that.