For anyone working on gRPC or other technologies that involve generating code from a schema, may I recommend this approach to integration. If what you’re working on involves a change the schema along with a change the implementation, then when it comes time to merging your changes to main, merge them at the same time. You can raise the merge request for the schema changes when they’re ready, and have others look at it while you work on the implementation, but hold off from pushing that “Merge” button until the implementation is also ready to merge.

The reason for doing it this way is that it keeps others working on the same project from pulling in your schema changes before you’ve finished the implementation. If they’re making their own changes to the schema, and have to regenerate the code, your changes will be pulled in too, and they’ll be left to figure out how to implement the schema changes you introduce. This either lead to build errors, test failures, or adding stub panics with messages like “implement me,” which will either lead to conflicts or worse, these errors being deployed to prod. In other words: disharmony across the team is introduced.

So resist the urge to merge schema changes before the implementation is done. I know, it’s tempting: to be able to click that one “Merge” button and get the rush of accomplishment as that one branch is closed off. But think of it like this: hold off for now, and then you get that feeling doubly so when you merge multiple branches at once.