chore: Split proto breaking change detection config (#2212)

We generally care about preserving JSON compatibility for protobuf
files, but for some files, where we only use pure gRPC, we only
care about preserving wire compatibility.

Split our buf breaking invocation into two invocations, one that checks
for WIRE_JSON compatibility, and one that checks only for WIRE
compatibility. The former check ignores protos in controller/servers,
since they do not need to adhere to this stricter definition.
This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2022-06-17 11:58:37 -04:00
1 parent 6ffef1e4b5
commit 77bc45ae62
4 files changed
+48 -13

No files matched your search

+7 -1
View File
@@ -211,7 +211,13 @@ protobuild:
.PHONY: protolint
protolint:
@buf lint
@buf breaking --against 'https://github.com/hashicorp/boundary.git#branch=stable-website'
# First check all protos except controller/servers for WIRE_JSON compatibility
cd internal/proto && buf breaking --against 'https://github.com/hashicorp/boundary.git#branch=stable-website,subdir=internal/proto' \
--exclude-path=controller/servers \
--config buf.breaking.json.yaml
# Next check all protos for WIRE compatibility. WIRE is a subset of WIRE_JSON so we don't need to exclude any files.
cd internal/proto && buf breaking --against 'https://github.com/hashicorp/boundary.git#branch=stable-website,subdir=internal/proto' \
--config buf.breaking.wire.yaml
.PHONY: website
# must have nodejs and npm installed