Repository navigation
v0.6.0 — pub/sub routing + bulk, streaming crypto, error model
Pub/sub routing and bulk subscribe, streaming crypto, and the error-model redesign. This release has breaking changes to the dapr-wasm-components:interfaces WIT package since v0.4.0. It includes the 0.5.0 changes, which had no GitHub release of their own.
Breaking
- Error model redesign (0.5.0). There is no longer one shared 7-case
errorvariant.- Each interface now has its own
variants for errors you can recover from, sometimes per function. Example:state.save→write-error { etag-mismatch, … }. - A missing value is now an error case such as
key-not-found. It is no longeroptionin the success type. - Infrastructure failures, such as the sidecar being down, a 5xx or a timeout, now trap instead of being typed.
- Inbound callbacks use
types.app-error.
- Each interface now has its own
topic-subscriptionhas new fields. If you build the record literally, addroutes: none, bulk-subscribe: none. You can also use the newdapr-appbuilder:TopicSubscription::new(pubsub, topic).- New export
pubsub-callback.on-bulk-topic-event. Apps built on thedapr-appSDK get a default implementation. Apps that implement the WIT directly must add it.
New
- Pub/sub CEL routing rules.
topic-subscription.routes { rules: [{match, path}], default }. daprd evaluates the rules, and the matched route arrives intopic-event.path. SDK:.with_rule(cel, path).with_default_route(path). - Pub/sub bulk subscribe.
- Turn it on with
.with_bulk_subscribe(max_count, max_await_ms). Batches arrive aton-bulk-topic-event, with a status for each entry (SUCCESS / RETRY / DROP). - The SDK default passes each entry to
on_topic_event. - You can use it together with routing rules.
- gRPC inbound serves
OnBulkTopicEventand the olderOnBulkTopicEventAlpha1.
- Turn it on with
- Streaming crypto with sync WIT resources (no WASI 0.3).
- Use
encryptor/decryptor:writethe input in chunks, callfinish, then read the output in chunks fromcrypto-output. The SDK wraps these asstd::iotypes indapr_app::crypto_io. wasi-http-outboundstreams both HTTP bodies. daprd v1.18 still buffers the output and limits the input to--max-body-size(default 4Mi).wasi-grpc-outboundbuffers the data in provider memory, and payloads over 4Mi work.
- Use
Fixes
- Secrets. A missing secret now returns
secret-not-foundon both providers. Before, it trapped against a real daprd, because daprd reports a missing secret asERR_SECRET_GET. - Crypto. "Component not found" now maps to
component-not-found.
Findings (documented, no API change)
- Input-binding reply. daprd ignores the input-binding reply. On the HTTP app channel it ignores the reply completely. On the gRPC channel it uses only
to/data/concurrency. The E2E records this behaviour, so we will notice if daprd changes it. - Workflow. Only the HTTP workflow API is deprecated. The gRPC provider uses the
*WorkflowBeta1RPCs, which are not deprecated. - Actor hosting with gRPC outbound. Compose
--out grpc --in httpand run daprd with--app-protocol http.
Tooling
- wasmtime 49, wit-bindgen 0.62, wac-graph 0.12
- CI runs Spin v4.2.2, wkg 0.16.1 and daprd 1.18.7
Full changelog: v0.4.0...v0.6.0