Use validation middleware based on .proto
When Gitaly needs to validate the request, it is usually the first thing that's happens on a request. I always fear to check this when reviewing, or miss an edge case.
One thing that could potentially help us: https://github.com/grpc-ecosystem/go-grpc-middleware/tree/master/validator
It requires us to define acceptable values for properties in the .proto and have a middleware check it so no developer can forget.
Edited by Zeger-Jan van de Weg