authzed / api

Protocol Buffers & gRPC Services used by SpiceDB
https://authzed.com/docs
Apache License 2.0
15 stars 17 forks source link

Mark authzed.api.v0 as deprecated #26

Closed jzelinskie closed 2 years ago

jzelinskie commented 2 years ago

Once we've published a timeline for formally dropping support for the v0 API, we'll mark the gRPC services as deprecated.

I'm not sure if this is something formally supported by the buf registry.

cc @bufdev

amckinney commented 2 years ago

Service-level deprecation isn't something that the BSR supports - it's an option baked into the Protobuf language itself. You can deprecate an entire service or individual methods with the following:

// The entire HelloService is deprecated.
service HelloService {
  option deprecated = true;
  rpc Hello(HelloRequest) returns (HelloResponse) {}
}

// Only the SayGoodbye RPC is deprecated.
service GoodbyeService {
  rpc SayGoodbye(SayGoodbyeRequest) returns (SayGoodbyeResponse) {
    option deprecated = true;
  }
}

With that said, the BSR does offer repository-level deprecation. If your v0 API is tied to a BSR repository, you can deprecate the repository and direct your users to another BSR repository devoted to your v1 API. I imagine you have other types you don't want to deprecate in your BSR repository though, so you might not want to deprecate the entire thing.

Hopefully one of these approaches is what you're looking for - I'd be curious to hear what you end up going with, so please let us know!