A common strategy of sharing protocol buffers seems to be to store these files in a separate Git repository as recommended by multiple answers:
- Where to store proto files which are shared among projects?
- How to share Protobuf definitions for gRPC?
- How to Maintain Proto Files?
So I've decided to set up such a structure, but got stuck when setting up deployments.
My current situation
I have a service have called magic-service
which implements a .proto
file stored in proto-repo
. So the magic-service
repo does not store its own proto file, but fetches it when the service gets built.
Now I want to release a new feature for magic-service
, but that requires the .proto file to be updated first. But of course the public protobuf file cannot be updated before the implementation is available. It's a circular dependency.
Question
How do I safely deploy my service without having to publish its proto file first?
I would think that this is a common problem, but I wasn't able to find anything about it. Any suggestions or resources are welcome!