From fc312b1aa7ee29fec515fd2e2e853581c5f29dd7 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Sat, 6 Dec 2025 23:40:39 +0100 Subject: [PATCH] Migrate Buf configuration files from v1 to v2 Signed-off-by: Matthieu MOREL --- buf.gen-golang.yaml | 9 ++++--- buf.gen-noncrd.yaml | 34 ++++++++++++++--------- buf.gen.yaml | 54 ++++++++++++++++++++++--------------- buf.yaml | 12 ++++----- releasenotes/notes/3612.yml | 9 +++++++ 5 files changed, 73 insertions(+), 45 deletions(-) create mode 100644 releasenotes/notes/3612.yml diff --git a/buf.gen-golang.yaml b/buf.gen-golang.yaml index 3b4cc305339..0751b41fe9c 100644 --- a/buf.gen-golang.yaml +++ b/buf.gen-golang.yaml @@ -1,8 +1,9 @@ # buf.gen.yaml sets up the generation configuration for all of our plugins. # Note: buf does not allow multi roots that are within each other; as a result, the common-protos folders are # symlinked into the top level directory. -version: v1 +version: v2 plugins: -- name: go - out: . - opt: paths=source_relative \ No newline at end of file + - local: protoc-gen-go + out: . + opt: + - paths=source_relative diff --git a/buf.gen-noncrd.yaml b/buf.gen-noncrd.yaml index b4d313216b5..ac4836fef4e 100644 --- a/buf.gen-noncrd.yaml +++ b/buf.gen-noncrd.yaml @@ -1,14 +1,22 @@ -version: v1 +version: v2 plugins: -- name: go - out: . - opt: paths=source_relative -- name: go-grpc - out: . - opt: paths=source_relative -- name: docs - out: . - opt: warnings=false,dictionary=./dictionaries/en-US,custom_word_list=./dictionaries/custom.txt,per_file=true,mode=html_fragment_with_front_matter -- name: golang-jsonshim - out: . - opt: paths=source_relative \ No newline at end of file + - local: protoc-gen-go + out: . + opt: + - paths=source_relative + - local: protoc-gen-go-grpc + out: . + opt: + - paths=source_relative + - local: protoc-gen-docs + out: . + opt: + - warnings=false + - dictionary=./dictionaries/en-US + - custom_word_list=./dictionaries/custom.txt + - per_file=true + - mode=html_fragment_with_front_matter + - local: protoc-gen-golang-jsonshim + out: . + opt: + - paths=source_relative diff --git a/buf.gen.yaml b/buf.gen.yaml index 3d6e89d2e33..53f28a76c4b 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,26 +1,36 @@ # buf.gen.yaml sets up the generation configuration for all of our plugins. # Note: buf does not allow multi roots that are within each other; as a result, the common-protos folders are # symlinked into the top level directory. -version: v1 +version: v2 plugins: -- name: go - out: . - opt: paths=source_relative -- name: go-grpc - out: . - opt: paths=source_relative -- name: golang-deepcopy - out: . - opt: paths=source_relative -- name: crd - out: . - strategy: all -- name: golang-jsonshim - out: . - opt: paths=source_relative -- name: alias - out: . - opt: paths=source_relative -- name: docs - out: . - opt: warnings=false,dictionary=./dictionaries/en-US,custom_word_list=./dictionaries/custom.txt,per_file=true,mode=html_fragment_with_front_matter + - local: protoc-gen-go + out: . + opt: + - paths=source_relative + - local: protoc-gen-go-grpc + out: . + opt: + - paths=source_relative + - local: protoc-gen-golang-deepcopy + out: . + opt: + - paths=source_relative + - local: protoc-gen-crd + out: . + strategy: all + - local: protoc-gen-golang-jsonshim + out: . + opt: + - paths=source_relative + - local: protoc-gen-alias + out: . + opt: + - paths=source_relative + - local: protoc-gen-docs + out: . + opt: + - warnings=false + - dictionary=./dictionaries/en-US + - custom_word_list=./dictionaries/custom.txt + - per_file=true + - mode=html_fragment_with_front_matter diff --git a/buf.yaml b/buf.yaml index 13b8c68af56..be9a860337f 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,14 +1,14 @@ -version: v1 -build: - excludes: - - common-protos +version: v2 +modules: + - path: . + excludes: + - common-protos breaking: use: - - WIRE_JSON + - WIRE_JSON lint: use: - BASIC except: - FIELD_LOWER_SNAKE_CASE - PACKAGE_DIRECTORY_MATCH - allow_comment_ignores: true diff --git a/releasenotes/notes/3612.yml b/releasenotes/notes/3612.yml new file mode 100644 index 00000000000..e0cbc77cb96 --- /dev/null +++ b/releasenotes/notes/3612.yml @@ -0,0 +1,9 @@ +apiVersion: release-notes/v2 +kind: bug-fix +area: documentation +issue: + - https://github.com/istio/istio/issues/3612 + +releaseNotes: + - | + **Upgraded** Buf configuration files from v1 to v2.