From what I can see with my own recent testing, this error occurs when you're trying to do buf breaking
against a branch that doesn't yet have the proto files in it. Were there existing proto files in master when you attempted to target it with buf breaking
?
Another issue you might have is that you need to make sure you've informed buf breaking
of where your buf.yaml
is for the git repo. If it's not in the root of your repository, you'll need to add the subdir
option to your --against
argument to ensure imports are resolved correctly as shown in this example on their documentation: https://docs.buf.build/tutorials/getting-started-with-buf-cli#run-buf-breaking
Assuming your buf.yaml
was in grpc
rather than the root of the project, you'd need to modify your command to be:
buf breaking --against '../.git#branch=master,subdir=grpc' --path grpc/path/to/protoFile.proto --error-format=json