Skip to content

feat: update protos to Dapr v1.17.0-rc.1 and add Buf scaffolding#740

Draft
nelson-parente wants to merge 3 commits intodapr:mainfrom
nelson-parente:feat/proto-v1.17-buf-migration
Draft

feat: update protos to Dapr v1.17.0-rc.1 and add Buf scaffolding#740
nelson-parente wants to merge 3 commits intodapr:mainfrom
nelson-parente:feat/proto-v1.17-buf-migration

Conversation

@nelson-parente
Copy link
Copy Markdown

Summary

  • Update scripts/fetch-proto.sh to download proto definitions from Dapr v1.17.0-rc.1 (was v1.16.0-rc.3)
  • Add 13 new building block message type protos that were split out of dapr.proto in v1.17 (actors, ai, binding, configuration, crypto, invoke, jobs, lock, metadata, pubsub, secret, state, workflow)
  • Add google/protobuf/struct.proto and duration.proto (new import dependencies)
  • Pin Google well-known type downloads to protobuf v28.3 (was floating master)
  • Add buf.yaml and buf.gen.yaml scaffolding for future Buf migration (Update build scripts + migration to use Buf #737)
  • Fix compilation order: message type protos compile before service definitions

New APIs Unblocked

This proto update is the prerequisite for implementing:

Test plan

  • Run ./scripts/fetch-proto.sh locally to verify all proto files download successfully
  • Run npm run build to verify TypeScript compilation with regenerated stubs
  • Run npm run test:unit:all to verify no unit test regressions
  • Verify buf lint passes with the new buf.yaml config

Note

Generated proto stubs are NOT regenerated in this PR — run ./scripts/fetch-proto.sh after review to regenerate. A follow-up PR will complete the Buf migration by replacing the shell-based protoc invocations with buf generate.

Update fetch-proto.sh to download proto definitions from Dapr v1.17.0-rc.1
(previously pinned to v1.16.0-rc.3). This adds all new building block
message type protos that were split out of dapr.proto in v1.17:

- runtime/v1/actors.proto
- runtime/v1/ai.proto (Conversation Alpha2)
- runtime/v1/binding.proto
- runtime/v1/configuration.proto
- runtime/v1/crypto.proto
- runtime/v1/invoke.proto
- runtime/v1/jobs.proto (Jobs/Scheduler Alpha1)
- runtime/v1/lock.proto
- runtime/v1/metadata.proto
- runtime/v1/pubsub.proto (streaming subscriptions)
- runtime/v1/secret.proto
- runtime/v1/state.proto
- runtime/v1/workflow.proto (Beta1/Stable)

Also adds:
- google/protobuf/struct.proto and duration.proto (new dependencies)
- Pin Google WKT downloads to protobuf v28.3 (was floating master)
- buf.yaml and buf.gen.yaml scaffolding for future Buf migration
- Correct compilation order (message types before service definitions)

The generated proto stubs are NOT regenerated in this commit — run
`./scripts/fetch-proto.sh` locally to regenerate after merging.

Relates to: dapr#737, dapr#667, dapr#664, dapr#668

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d1bf38a) to head (9b62797).
⚠️ Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #740   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            6         6           
  Branches         1         1           
=========================================
  Hits             6         6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Add missing google/protobuf/wrappers.proto (sentry.proto imports it)
- Add missing dapr/proto/internals/v1/reminders.proto (service_invocation.proto imports it)
- Fix compile order: appcallback.proto before pubsub.proto (pubsub imports appcallback)
- Fix compile order: reminders.proto before service_invocation.proto
- Add curl --fail flag to catch HTTP 404 errors on proto downloads
- Quote variables in mkdir -p to handle paths with spaces
- Scope buf.yaml module path to src/proto/dapr (excludes Google WKTs from lint)
- Scope buf.gen.yaml inputs to src/proto/dapr (prevents duplicate codegen of WKTs)
- Remove BSR module name from buf.yaml (not pushing to BSR)
- Add google/protobuf/wrappers.proto to compile section

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
Regenerate all proto stubs from Dapr v1.17.0-rc.1. In this version,
message types were split from dapr.proto into per-building-block
proto files (actors.proto, binding.proto, state.proto, etc.).

Update all TypeScript imports across src/ and test/ to reference
the new proto modules:
- actors_pb: actor state, invoke, timer, reminder types
- binding_pb: InvokeBindingRequest/Response
- configuration_pb: Get/Subscribe/Unsubscribe configuration types
- crypto_pb: Encrypt/Decrypt request/options types
- invoke_pb: InvokeServiceRequest
- lock_pb: TryLock/Unlock request/response types
- metadata_pb: GetMetadata/SetMetadata request/response types
- pubsub_pb: PublishEvent/BulkPublish types
- secret_pb: GetSecret/GetBulkSecret types
- state_pb: GetState/SaveState/DeleteState/Query/Transaction types

Also:
- Add grpc-tools and protoc-gen-js to devDependencies (previously
  installed ad-hoc via --no-save, causing reproducibility issues)
- Update fetch-proto.sh to use npm-installed plugins with explicit
  paths instead of relying on system PATH

Verified: tsc --noEmit passes with 0 errors, all 172 unit tests pass.

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
@WhitWaldo
Copy link
Copy Markdown
Contributor

@nelson-parente This SDK needs a bit of work on it to catch up to the status quo (especially on conversation) before it can merge the 1.17 runtime (which introduced a breaking change in the latest conversation update), so this PR likely won't be merged for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants