[GH-ISSUE #1405] Feature request: support v2 storage API #195

Open
opened 2026-03-03 12:09:04 +03:00 by kerem · 6 comments
Owner

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:

The v1 gRPC service no longer runs and instead Google Cloud Storage only supports v2 API calls.

Please support the v2 grpc api.

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: > The v1 gRPC service no longer runs and instead Google Cloud Storage only supports v2 API calls. Please support the v2 grpc api.
Author
Owner

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

<!-- gh-comment-id:1825503182 --> @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.
Author
Owner

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

<!-- gh-comment-id:2546445392 --> @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.
Author
Owner

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

<!-- gh-comment-id:3160713596 --> @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](https://pkg.go.dev/google.golang.org/genproto/googleapis/storage/v2) 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](https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb). 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...
Author
Owner

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

<!-- gh-comment-id:3299610543 --> @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.
Author
Owner

@tritone commented on GitHub (Sep 16, 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...

One note, the GCS Go client does still use the v1 JSON API by default when initialized with storage.NewClient. You have to use NewGRPCClient to 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).

<!-- gh-comment-id:3299647777 --> @tritone commented on GitHub (Sep 16, 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](https://pkg.go.dev/google.golang.org/genproto/googleapis/storage/v2) 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](https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb). 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... One note, the GCS Go client does still use the v1 JSON API by default when initialized with `storage.NewClient`. You have to use `NewGRPCClient` to 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).
Author
Owner

@peterebden commented on GitHub (Sep 22, 2025):

One note, the GCS Go client does still use the v1 JSON API by default when initialized with storage.NewClient. You have to use NewGRPCClient to 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).

Yep, understood. Sorry I wasn't particularly clear earlier - I meant that if you use NewGRPCClient then 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.

<!-- gh-comment-id:3318762701 --> @peterebden commented on GitHub (Sep 22, 2025): > One note, the GCS Go client does still use the v1 JSON API by default when initialized with `storage.NewClient`. You have to use `NewGRPCClient` to 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). Yep, understood. Sorry I wasn't particularly clear earlier - I meant that if you use `NewGRPCClient` then 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](https://pkg.go.dev/cloud.google.com/go/storage#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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#195
No description provided.