From ff58180d6a2c8a26bc605c02b32bf84c274bcba4 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 25 Aug 2026 10:06:16 -0400 Subject: [PATCH 1/6] Bump pinned buf to v1.49.0 and drop the unused grpc-gateway dep Preparation for migrating buf.yaml to v2. The pinned v1.27.0 predates v2 config and rejects it outright, so it has to move first. v1.49.0 is what .github/workflows/push-to-buf.yml already runs against this repo. v1.32.0 moved buf mod prune to buf dep prune and deprecated the old spelling, so the Makefile target follows. Any buf that new also prunes buf.build/grpc-ecosystem/grpc-gateway out of buf.lock, because nothing under temporal/ imports it. Left in buf.yaml, that prune would dirty the tree and fail CI's uncommitted-changes check, so drop the dep and commit the pruned lock. --- Makefile | 8 ++++---- buf.lock | 5 ----- buf.yaml | 1 - 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d43b05677..f6fcf899d 100644 --- a/Makefile +++ b/Makefile @@ -97,7 +97,7 @@ api-linter-install: buf-install: printf $(COLOR) "Install/update buf..." - go install github.com/bufbuild/buf/cmd/buf@v1.27.0 + go install github.com/bufbuild/buf/cmd/buf@v1.49.0 ##### Sync external proto dependencies ##### sync-nexus-annotations: @@ -112,12 +112,12 @@ api-linter: $(STAMPDIR): mkdir $@ -$(STAMPDIR)/buf-mod-prune: $(STAMPDIR) buf.yaml +$(STAMPDIR)/buf-dep-prune: $(STAMPDIR) buf.yaml printf $(COLOR) "Pruning buf module" - buf mod prune + buf dep prune touch $@ -buf-lint: $(STAMPDIR)/buf-mod-prune +buf-lint: $(STAMPDIR)/buf-dep-prune printf $(COLOR) "Run buf linter..." (cd $(PROTO_ROOT) && buf lint) diff --git a/buf.lock b/buf.lock index f43352bf2..9084f5618 100644 --- a/buf.lock +++ b/buf.lock @@ -6,11 +6,6 @@ deps: repository: googleapis commit: 004180b77378443887d3b55cabc00384 digest: shake256:d26c7c2fd95f0873761af33ca4a0c0d92c8577122b6feb74eb3b0a57ebe47a98ab24a209a0e91945ac4c77204e9da0c2de0020b2cedc27bdbcdea6c431eec69b - - remote: buf.build - owner: grpc-ecosystem - repository: grpc-gateway - commit: 6467306b4f624747aaf6266762ee7a1c - digest: shake256:833d648b99b9d2c18b6882ef41aaeb113e76fc38de20dda810c588d133846e6593b4da71b388bcd921b1c7ab41c7acf8f106663d7301ae9e82ceab22cf64b1b7 - remote: buf.build owner: temporalio repository: nexus-annotations diff --git a/buf.yaml b/buf.yaml index 2f2fa5389..3e4dab0f6 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,7 +1,6 @@ version: v1 name: buf.build/temporalio/api deps: - - buf.build/grpc-ecosystem/grpc-gateway - buf.build/googleapis/googleapis - buf.build/temporalio/nexus-annotations build: From d81350bde561a62f7c82946c1f95c877eef6e8f5 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 25 Aug 2026 10:06:27 -0400 Subject: [PATCH 2/6] Migrate buf.yaml and buf.lock to v2 Autogenerated, no hand edits: buf config migrate --module . buf's own migration path, per https://buf.build/docs/migration-guides/migrate-v2-config-files/. --module restricts it to buf.yaml and buf.lock, leaving buf.gen.yaml at v1; that file is unreferenced by the Makefile and CI and points at a protoc-gen-go-helpers directory that does not exist here, so it is dead config and out of scope. v2 exists since v1.32.0. v1 remains supported with no deadline, so this is not a forced upgrade; the motivation is that the buf language server does not discover module roots from a v1 buf.yaml, and reports every import in every .proto as unresolved. The added lint and breaking except entries are the tool preserving current behaviour: v2 turns on rules that v1 did not run. --- buf.lock | 14 +++++--------- buf.yaml | 32 ++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/buf.lock b/buf.lock index 9084f5618..e0559987a 100644 --- a/buf.lock +++ b/buf.lock @@ -1,13 +1,9 @@ # Generated by buf. DO NOT EDIT. -version: v1 +version: v2 deps: - - remote: buf.build - owner: googleapis - repository: googleapis + - name: buf.build/googleapis/googleapis commit: 004180b77378443887d3b55cabc00384 - digest: shake256:d26c7c2fd95f0873761af33ca4a0c0d92c8577122b6feb74eb3b0a57ebe47a98ab24a209a0e91945ac4c77204e9da0c2de0020b2cedc27bdbcdea6c431eec69b - - remote: buf.build - owner: temporalio - repository: nexus-annotations + digest: b5:e8f475fe3330f31f5fd86ac689093bcd274e19611a09db91f41d637cb9197881ce89882b94d13a58738e53c91c6e4bae7dc1feba85f590164c975a89e25115dc + - name: buf.build/temporalio/nexus-annotations commit: 599b78404fbe4e78b833d527a1d0da40 - digest: shake256:1f41ef11ccbf31d7318b0fe1915550ba6567c99dc94694d60b117fc1ffc756290ba9766c58b403986f079e2b861b42538e5f8cf0495f744cd390d223b81854ca + digest: b5:feb0298a2e7e60058a5dee533e166e152bd0c3b9f776170946fba80737722022a39a65b132af1028d150d2c5bc52990694f60fbcf89fbb9693f7a6b7803d9203 diff --git a/buf.yaml b/buf.yaml index 3e4dab0f6..cfd68e15e 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,23 +1,27 @@ -version: v1 -name: buf.build/temporalio/api +version: v2 +modules: + - path: . + name: buf.build/temporalio/api + excludes: + - google + - nexusannotations deps: - buf.build/googleapis/googleapis - buf.build/temporalio/nexus-annotations -build: - excludes: - # Buf won't accept a local dependency on the google protos but we need them - # to run api-linter, so just tell buf it ignore it - - google - # Same for nexusannotations - local copy for api-linter, BSR dep for buf - - nexusannotations -breaking: +lint: use: - - WIRE_JSON + - DEFAULT + except: + - FIELD_NOT_REQUIRED + - PACKAGE_NO_IMPORT_CYCLE ignore: + - cmd - google -lint: + disallow_comment_ignores: true +breaking: use: - - DEFAULT + - WIRE_JSON + except: + - FIELD_SAME_DEFAULT ignore: - google - - cmd From 4132ba7d8defac2c2d7cab8f91145a52ab8f7ad5 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 25 Aug 2026 10:10:25 -0400 Subject: [PATCH 3/6] Document the excludes and rename DEFAULT to STANDARD Two hand fixups on top of the generated migration. buf config migrate rewrites buf.yaml structurally and drops comments. The two comments on excludes are replaced by one line stating why they are needed, both halves of which are verified: dropping either exclude makes buf build fail with "contained in multiple modules", and moving either vendored directory aside makes api-linter fail to resolve its imports, since it reads -I paths and not the BSR. v1.40.0 renamed the DEFAULT lint category to STANDARD and buf warns on every invocation while the old name is used. buf config ls-lint-rules on each expands to the same 36 rules, so this is a rename only. The tool does not do it because DEFAULT still works. --- buf.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buf.yaml b/buf.yaml index cfd68e15e..e1ffd7e88 100644 --- a/buf.yaml +++ b/buf.yaml @@ -3,6 +3,7 @@ modules: - path: . name: buf.build/temporalio/api excludes: + # Vendored for api-linter (can't read the BSR); excluded so buf sees them once. - google - nexusannotations deps: @@ -10,7 +11,7 @@ deps: - buf.build/temporalio/nexus-annotations lint: use: - - DEFAULT + - STANDARD except: - FIELD_NOT_REQUIRED - PACKAGE_NO_IMPORT_CYCLE From aedf086ec6bc2ca520229875159791e3da24fc71 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 25 Aug 2026 11:34:38 -0400 Subject: [PATCH 4/6] Delete apparently unused buf.gen.yaml --- buf.gen.yaml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 buf.gen.yaml diff --git a/buf.gen.yaml b/buf.gen.yaml deleted file mode 100644 index 555cd008d..000000000 --- a/buf.gen.yaml +++ /dev/null @@ -1,20 +0,0 @@ -version: v1 -plugins: - - plugin: buf.build/protocolbuffers/go:v1.31.0 - out: ./ - opt: - - paths=source_relative - - plugin: buf.build/grpc/go:v1.3.0 - out: ./ - opt: - - paths=source_relative - - plugin: buf.build/grpc-ecosystem/gateway:v2.18.0 - out: ./ - opt: - - paths=source_relative - - allow_patch_feature=false - - name: go-helpers - out: ./ - path: ["go", "run", "./protoc-gen-go-helpers"] - opt: - - paths=source_relative From 90c110e51bb53be8b2b1b7ac72822e9eef761471 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 25 Aug 2026 12:26:37 -0400 Subject: [PATCH 5/6] Remove two unnecessary exceptions --- buf.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/buf.yaml b/buf.yaml index e1ffd7e88..41ddef213 100644 --- a/buf.yaml +++ b/buf.yaml @@ -12,9 +12,6 @@ deps: lint: use: - STANDARD - except: - - FIELD_NOT_REQUIRED - - PACKAGE_NO_IMPORT_CYCLE ignore: - cmd - google From 187c7f0208c9e4de6a49591e8bf27dffe7c57ac3 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 25 Aug 2026 12:45:50 -0400 Subject: [PATCH 6/6] drop auto-added except --- buf.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/buf.yaml b/buf.yaml index 41ddef213..d00ec17a7 100644 --- a/buf.yaml +++ b/buf.yaml @@ -19,7 +19,5 @@ lint: breaking: use: - WIRE_JSON - except: - - FIELD_SAME_DEFAULT ignore: - google