Skip to content

Commit f465f2d

Browse files
authored
tooling: replace protolock with buf breaking (#3101)
1 parent a41168b commit f465f2d

File tree

6 files changed

+45
-48842
lines changed

6 files changed

+45
-48842
lines changed

Makefile.core.mk

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ all: gen
2222

2323
repo_dir := .
2424

25-
protolock = protolock
2625
annotations_prep = annotations_prep
2726
htmlproofer = htmlproofer
2827

@@ -46,10 +45,13 @@ gen: \
4645
generate-labels \
4746
mirror-licenses \
4847
tidy-go \
49-
proto-commit
48+
breaking
5049

5150
gen-check: gen check-clean-repo
5251

52+
breaking:
53+
@./scripts/breaking.sh $(UPDATE_BRANCH)
54+
5355
#####################
5456
# annotation/...
5557
#####################
@@ -84,19 +86,6 @@ generate-labels: $(labels_pb_go) $(labels_pb_doc)
8486
clean-labels:
8587
@rm -fr $(labels_pb_go) $(labels_pb_doc)
8688

87-
#####################
88-
# Protolock
89-
#####################
90-
91-
proto-commit:
92-
@$(protolock) commit
93-
94-
proto-commit-force:
95-
@$(protolock) commit --force
96-
97-
proto-status:
98-
@$(protolock) status
99-
10089
#####################
10190
# Misc
10291
#####################
@@ -109,7 +98,7 @@ local-lint-protos:
10998
lint: lint-dockerfiles lint-scripts lint-yaml lint-helm lint-copyright-banner lint-go lint-python lint-markdown lint-sass lint-typescript lint-licenses local-lint-protos
11099
@$(htmlproofer) . --url-swap "istio.io:preliminary.istio.io" --assume-extension --check-html --check-external-hash --check-opengraph --timeframe 2d --storage-dir $(repo_dir)/.htmlproofer --url-ignore "/localhost/"
111100

112-
test:
101+
test: breaking
113102
(pushd tests && go test -v ./...)
114103

115104
fmt: format-python
@@ -118,7 +107,7 @@ fmt: format-python
118107
# CI System
119108
#####################
120109

121-
presubmit: proto-commit lint test
110+
presubmit: lint test
122111
postsubmit: presubmit
123112

124113
#####################

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ gen` will update the proto.lock file with new changes.
2222

2323
## Backwards Incompatible Changes
2424

25-
If a PR tries to make backwards incompatible changes, it will be
26-
blocked by protolock. To force these changes in, install
27-
[protolock](https://github.com/nilslice/protolock) and run
28-
`protolock commit --force`.
29-
30-
You must include a note in your PR that you had to force the
31-
protolock and why.
25+
If a PR tries to make backwards incompatible changes, it will be blocked by `buf breaking`.
26+
If there are legitimate reasons to make these breaking changes forever, the configuration in [`buf.yaml`](buf.yaml) can be changed.
27+
If it is a one-off case, the PR can be force approved skipping the test.

buf.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ version: v1
22
build:
33
excludes:
44
- common-protos
5+
breaking:
6+
use:
7+
- WIRE_JSON
58
lint:
69
use:
710
- BASIC

0 commit comments

Comments
 (0)