Protobuf Breaking Change Validator

Proof of concept of automated breaking change validation on protobuf schemas.

Author Avatar

Cássio

  ·  1 min read

ℹ️ This article was originally published in Portuguese on LinkedIn. You can read the original version here.

Hello everyone! 👋

In the last few weeks, I came across an interesting challenge and would like to share what I learned.

⚠️ Problem #

In the context of event-based systems, how can we ensure there are no compatibility breaks when working with schemas using Protobufs? Recently, this question arose in the team I work with.

💡 Insight #

An automated validation would be ideal to prevent changes that could break event compatibility. This type of compatibility is known as backward compatibility.

✅ Solution #

After some research, we found options like Buf CLI, which offers command-line tools to validate and prevent compatibility breaks. In addition to other features, such as lint and Git integration, which greatly simplifies the workflow.

📌 Proof of concept #

Here is a proof of concept (POC) using this approach, running via GitHub Actions and adding feedback directly on Pull Requests:

Proof of concept example

📚 References #