Skip to content

Commit

Permalink
buf migrate to v2 (#328) (#329)
Browse files Browse the repository at this point in the history
Signed-off-by: Kosuke Morimoto <[email protected]>
(cherry picked from commit b820502)
  • Loading branch information
kmrmt authored Oct 15, 2024
1 parent 4f1ea1b commit cdd3cf1
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ clean:
## build proto
proto: $(VALD_DIR) $(JAVA_ROOT)
@$(call green, "generating .java files...")
sed -i '/lint:/a \ ignore: [v1]' $(PROTO_ROOT)/buf.yaml
echo 'build:\n excludes: [v1/agent/sidecar, v1/discoverer, v1/manager]' >> $(PROTO_ROOT)/buf.yaml
./gradlew bufGenerate \
bufFormatApply \
bufFormatCheck \
Expand Down
6 changes: 3 additions & 3 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: v1
version: v2
plugins:
- plugin: buf.build/grpc/java
- remote: buf.build/grpc/java
out: main/java
- plugin: buf.build/protocolbuffers/java:v25.3
- remote: buf.build/protocolbuffers/java:v25.3
out: main/java
9 changes: 9 additions & 0 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/bufbuild/protovalidate
commit: 1baebb0a15184714854fa1ddfd22a29b
digest: b5:6ee11b05d5f54b6257c79c3141eb1050723c4433cf490259ba1d8c02cd08c3e325625527b00fec4dc8b338901f1f3c567ef7ff0698b1c92d09b2dfa6f516c1e6
- name: buf.build/googleapis/googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
digest: b5:93b70089baa4fc05a92d3e52db91a4b7812db3b57b9664f6cb301733938cb630e377a938e8a56779388171c749c1d42a2e9a6c6230f2ff45f127a8102a6a27d0
3 changes: 0 additions & 3 deletions buf.work.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: v2
modules:
- path: vald/apis/proto
excludes:
- vald/apis/proto/v1/agent/sidecar
- vald/apis/proto/v1/discoverer
- vald/apis/proto/v1/manager
deps:
- buf.build/bufbuild/protovalidate
- buf.build/googleapis/googleapis
lint:
use:
- DEFAULT
except:
- FIELD_NOT_REQUIRED
- PACKAGE_NO_IMPORT_CYCLE
ignore:
- vald/apis/proto/v1
disallow_comment_ignores: true
breaking:
use:
- FILE
except:
- EXTENSION_NO_DELETE
- FIELD_SAME_DEFAULT

0 comments on commit cdd3cf1

Please sign in to comment.