Skip to content

Commit ee7b70a

Browse files
author
Toni Reina
authored
[CP-293] Add plugin to detect breaking changes with permissions (#202)
* Add plugin to detect breaking changes related to permissions * Add permissions plugin to the Makefile - Update `buf/plugins` target to install the new permissions plugin - Update the `lint` target to check for breaking changes
1 parent c95e459 commit ee7b70a

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ bootstrap: bootstrap/uv ## Install the required dependencies to use this project
2020
.PHONY: lint
2121
lint: buf/deps ## Check protobuf files for linting errors.
2222
buf lint
23+
buf breaking --against https://github.com/qdrant/qdrant-cloud-public-api.git
2324

2425
.PHONY: format
2526
format: buf/deps ## Format protobuf files (in-place) using `buf format`.
@@ -32,7 +33,7 @@ generate: clean format lint ## Generate language bindings.
3233
uv run buf generate
3334
./scripts/cleanup-gencode-comments.sh
3435
rm -rf gen-dummy/
35-
36+
3637
.PHONY: build-go
3738
build-go:
3839
go build ./...
@@ -52,9 +53,9 @@ deps: ## Install the required dependencies to use this project.
5253

5354
.PHONY: buf/plugins
5455
buf/plugins: ## Install the required buf plugins (those that can't be installed using Buf's deps option).
55-
export GOPRIVATE=github.com/qdrant/ && \
5656
go install github.com/qdrant/qdrant-cloud-buf-plugins/cmd/buf-plugin-required-fields@latest && \
57-
go install github.com/qdrant/qdrant-cloud-buf-plugins/cmd/buf-plugin-method-options@latest
57+
go install github.com/qdrant/qdrant-cloud-buf-plugins/cmd/buf-plugin-method-options@latest && \
58+
go install github.com/qdrant/qdrant-cloud-buf-plugins/cmd/buf-plugin-permissions-breaking@latest
5859

5960
.PHONY: buf/deps
6061
buf/deps: buf/plugins ## Install the required dependencies to work with the protobuf files.

buf.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ lint:
1717
breaking:
1818
use:
1919
- FILE
20+
- QDRANT_CLOUD_PERMISSIONS_BREAKING
2021
plugins:
2122
- plugin: buf-plugin-method-options
2223
- plugin: buf-plugin-required-fields
24+
- plugin: buf-plugin-permissions-breaking

0 commit comments

Comments
 (0)