Skip to content

Releases: dapr/dotnet-sdk

v1.18.5

Choose a tag to compare

@WhitWaldo WhitWaldo released this 25 Jul 02:53
9a16009

What's Changed

  • Promoting Dapr.Actors.Next to 1.18 patch release by @WhitWaldo in #1865
  • Added support for actor retry failure policies by @WhitWaldo in #1872
  • Fixing workflow tracing + adding observability integration testing by @WhitWaldo in #1870
  • Can now pass environment variables into daprd container during integration tests by @WhitWaldo in #1871
  • No longer swallows exceptions for anything except NotFound error when retrieving workflow state from runtime by @WhitWaldo in #1877
  • Propagate trace context for gRPC calls by @mtaghavi2005 in #1858

Miscellaneous infrastructure changes:

New Contributors

Full Changelog: v1.18.4...v1.18.5

v1.19.0-preview.2 - Dapr.Actors.Next: A ground-up rewrite of Dapr Actors for .NET

Choose a tag to compare

@WhitWaldo WhitWaldo released this 11 Jul 06:42
fb7103a

Dapr.Actors.Next is a ground-up re-implementation of the Dapr Actors building block for .NET, shipping as a preview throughout the 1.18 release cycle, with a stable release planned alongside Dapr runtime v1.19. The actor model itself is unchanged: actors remain virtual, addressed by type and ID, and support reentrancy, timers, reminders, proxying, etc. However, the way the SDK connects to the runtime and the way you write actor code have been modernized.

Highlights

  • Streaming runtime connectivity
    Actor callbacks (invoke, reminder, timer, deactivate) now arrive over a long-lived bidirectional gRPC stream instead of inbound, per-call HTTP requests into mapped actor-handler endpoints. This is the same pattern already used for Dapr workflows and streaming pub/sub subscriptions. There are no actor handlers to map, though your app will still need to expose a port for inbound gRPC connections from the Dapr runtime.
  • No reflection, trim-clean and AOT-ready
    Source generators produce the proxy, dispatcher, activation factory, registration and actor registry from your interface and implementation. Actors are discovered rather than registered by hand, and the runtime packages can be used in applications building for Native AOT.
  • Compile-time safety
    The public surface is annotated for nullable reference types, and new analyzers and code fixes catch actor-specific mistakes as you type: non-serializable or non-task-returning methods, blocking calls inside a turn, state changes that would break deserialization, using a callback method in a reminder that doesn't exist in the specified type, reading time from the clock instead of an injected TimeProvider, and more!
  • Consistent with the rest of the modern Dapr .NET SDK packages
    This release features per-activation DI scopes, use of the options pattern (IOptions<DaprActorsOptions>), and the same pluggable IDaprSerializer (System.Text.Json by default) used by Dapr.StateManagement and Dapr.Workflow.
  • New capabilities
    State-envelope schema versioning with upcaster chains, a first-class StateMachineActor<TState, TData> model, pub/sub-driven actors via [Subscribe] applied to the method to call instead of requiring external startup subscription and invocation, dynamic invocation by type/id/method with no compile-time contract, and an in-memory deterministic test runtime with optional Coyote integration.

Performance
Replacing the reflection-based proxy and dispatch machinery with source generators shows up directly in the numbers. In our benchmarks, creating an actor proxy drops from roughly 725 ns and 3.4 KB allocated under Dapr.Actors to about 14 ns and 48 B under Dapr.Actors.Next: a ~50x improvement in time and ~70x in allocation. A warm actor call is about 20% faster (≈484 ns -> ≈375 ns) and allocates roughly 30% less (1,264 B -> 912 B). The largest end-to-end win is in startup: building the provider, resolving the actor runtime, and dispatching the first call takes ~284 µs under Dapr.Actors versus ~37 µs under Dapr.Actors.Next, an ~8x reduction that holds steady as the number of registered actor types grows because registration and dispatch are generated at compile time rather than discovered and emitted on first use. Container construction itself is marginally more expensive on the new SDK (~6.0 µs vs ~4.7 µs) as more is wired up front, but that cost is repaid many times over on the first invocation.

We expect further optimizations before the 1.19 GA.

Benchmarks run with BenchmarkDotNet; figures are means from a single machine and are indicative rather than a guarantee. Feel free to run them yourself from here.

Compatibility notes

  • This package requires the Dapr runtime v1.18 or later.
  • This package is not API compatible with the original Dapr.Actors. Because actors are addressed by the same type names, you can migrate one actor type at a time, but it's easier to do that across separate projects than to mix both SDKs in one.
  • Serialization is a clean break: there's a single serialization path and no built-in DataContract support (supply and register your own implementation of IDaprSerializer if you need it). Verify that existing persisted state still deserializes before migrating a type.
  • Dapr.Actors and its associated packages are now in maintenance mode and will receive security and bug fixes only. No deprecation date has been set.

Getting started
Add the package to your project:

dotnet add package Dapr.Actors.Next --prerelease

Then register it in DI with builder.Services.AddDaprActors().

Documentation is available along with a six-part tutorial spanning different implementation examples.

Please reach out in the .NET channel on Discord or file an issue if you encounter problems, have feature suggestions, or just want to share feedback about this new functionality!

v1.18.4

Choose a tag to compare

@WhitWaldo WhitWaldo released this 15 Jun 12:57
386b0ed

What's Changed

  • Fix build warnings about analyzer version in Dapr.Workflow by @WhitWaldo in #1851
  • FIx for Dapr.Common not being transiently referenced by project by @WhitWaldo in #1852
  • Downgrading analyzer assembly version to fix workflow registration issues by @WhitWaldo in #1854
  • Updating the runtime version numbers selection script by @WhitWaldo in #1855

Full Changelog: v1.18.2...v1.18.4

v1.18.2

Choose a tag to compare

@WhitWaldo WhitWaldo released this 13 Jun 10:39
c1a372a

What's Changed

  • Fixing workflow versioning out-of-order registration bug by @WhitWaldo in #1850
  • GetWorkflowStateAsync should always return WorkflowState by @WhitWaldo in #1847

Full Changelog: v1.18.1...v1.18.2

v1.18.1

Choose a tag to compare

@WhitWaldo WhitWaldo released this 11 Jun 01:09
76379c7

What's Changed

Full Changelog: v1.18.0...v1.18.1

What's Changed

General

  • ADDED Dapr.SecretsManagement package #1794 to split secret management into its own client
  • ADDED Dapr.StateManagement package #1806 to split state management into its own client
  • ADDED Rich backwards-compatibility support added to the SDK to better support runtime API maturation lifecycles #1816
  • ADDED Serializer refactored from Dapr.Workflow to Dapr.Common #1805 as a precursor to having common serialization across .NET SDK
  • ADDED Add optional parameter to configuration providers for non-blocking startup #1844
  • UPDATED Making DaprDefaults public #1845
  • FIXED Prevent race condition during GrpcProtocolHandler disposal #1798

Actors

  • ADDED UnloadStateAsync implementation #1750 to force actors to unload their currently cached in-memory state (no impact to persisted state). The next time GetStateAsync is called, the cache is repopulated as normal.

PubSub

  • FIXED Subscriber resilience: SubscribeAsync now throws DaprException when the sidecar is unavailable instead of failing silently #1803

Metadata

  • ADDED Added new Dapr.Metadata package for retrieving strongly typed data from the Dapr Metadata API #1846.
    To use, add Dapr.Metadata package from NuGet, register in DI with builder.Services.AddDaprMetadata() and simply inject IOptions<DaprMetadata>, IOptionsSnapshot<DaprMetadata> or IOptionsMonitor<DaprMetadata> and read the values out of the injected value.

Service Invocation

  • UPDATED InvokeMethodAsync family marked [Obsolete] aligning SDK with prior runtime guidance — recommended guidance is to use a native HTTP/gRPC client for service invocation #1698.

Jobs

  • UPDATED Jobs API marked stable #1804.
  • UPDATED Minimum-version tags adjusted to reflect broader test coverage (#1811).

Workflows

  • ADDED Workflow history context propagation (#1802)
  • UPDATED Combined Dapr.Workflow meta-project (#1822) and automatic workflow/activity registration (#1823)
    This means that there is no longer a need to install Dapr.Workflow.Versioning or Dapr.Workflow.Analyzers separately. All are bundled in the one Dapr.Workflow package, no refactoring necessary (though you might want to remove the stale packages).
  • UPDATED No longer logging connection closed exception when app closes #1841
  • UPDATED Use server-blocking WaitForInstnace* RPCs instead of client polling #1843
  • ADDED Timer origins and backwards-compatible optional timers (#1790)
  • ADDED Add workflow analyzer diagnostics on versioning (#1815
  • ADDED Expose name on workflow state #1836
  • ADDED Support history propagation API #1825, #1833
  • ADDED Expose workflow name on state #1836
  • FIXED Workflow patch ordering #1807, #1809
  • FIXED Trace propagation fix for downstream calls from workflow user activities #1808
  • FIXED Addressing "no such instance exists" errors #1818, #1812
  • FIXED Fix workflow trace correlation #1829
  • FIXED add missing FailureDetails property to proto converter #1831

Miscellaneous/Testing

  • ADDED Integration test project for Actors.Generators #1791.
  • ADDED Adding gRPC probe with HTTP/2 preface to eliminate some transient Unavailable errors during integration testing via Testcontainers #1821
  • UPDATED Stabilization of flaky integration tests #1813.
  • UPDATED CI script more accurately auto-detects valid Dapr runtime versions to support automatic N-2 validation #1810
  • REMOVED Removing deprecated analyzers/codefixes #1834

New Contributors

Full Changelog: v1.17.9...v1.18.1

v1.18.0-rc.7

v1.18.0-rc.7 Pre-release
Pre-release

Choose a tag to compare

@WhitWaldo WhitWaldo released this 08 Jun 04:48
afd90db

What's Changed

New Contributors

Full Changelog: v1.18.0-rc.4...v1.18.0-rc.7

v1.18.0-rc.4

v1.18.0-rc.4 Pre-release
Pre-release

Choose a tag to compare

@WhitWaldo WhitWaldo released this 21 May 23:25
0c6819f

What's Changed

  • Bundle Dapr.SecretsManagement.* and Dapr.StateManagement.* into single NuGet packages by @Copilot in #1827

Full Changelog: v1.18.0-rc.3...v1.18.0-rc.4

v1.18.0-rc.3

v1.18.0-rc.3 Pre-release
Pre-release

Choose a tag to compare

@WhitWaldo WhitWaldo released this 21 May 23:22
0621b54

What's Changed

  • Make Dapr.Workflow a single NuGet meta-package by @Copilot in #1824

Full Changelog: v1.18.0-rc02...v1.18.0-rc.3

v1.18.0-rc02

v1.18.0-rc02 Pre-release
Pre-release

Choose a tag to compare

@WhitWaldo WhitWaldo released this 20 May 19:43
7ecbb8d

What's Changed

  • feat: Implement Dapr.StateManagement package by @Copilot in #1806
  • Combine all Dapr.Workflow functionality into single meta project by @WhitWaldo in #1822
  • Automatic registration of workflows and activities by @WhitWaldo in #1823

Full Changelog: v1.18.0-rc01...v1.18.0-rc02

v1.18.0-rc01

v1.18.0-rc01 Pre-release
Pre-release

Choose a tag to compare

@WhitWaldo WhitWaldo released this 19 May 16:04
d708be4

What's Changed

New Features

  • Implement timer origins and backwards-compatible optional timers by @Copilot in #1790
  • Porting serialization from Dapr.Workflow as common approach used in all SDKs by @WhitWaldo in #1805
  • Promoting Jobs to stable APIs by @WhitWaldo in #1804
  • Implementation of UnloadStateAsync by @olitomlinson in #1750
  • Feature: Workflow history propagation by @WhitWaldo in #1802
  • feat: Implement Dapr.SecretsManagement package by @Copilot in #1794

Bug Fixes

  • bugfiix: Prevent race condition during GrpcProtocolHandler disposal by @WhitWaldo in #1798
  • bugfix: SubscribeAsync throws DaprException when sidecar is unavailable by @Copilot in #1803
  • bugfix: Addressing OpenTelemetry propagation bug by @WhitWaldo in #1808
  • bugfix(workflows): Addressing "no such instance exists" errors by @WhitWaldo in #1812
  • bugfix: Workflow analyzer was pointing to incorrect diagnostic ID by @WhitWaldo in #1815
  • bugfix: Workflow overhaul, new feature bugfix by @WhitWaldo in #1818
  • bugfix: API token unused with DeleteBulkStateAsync by @WhitWaldo in #1820
  • bugfix: Correctly apply patch inserted before current replay target by @WhitWaldo in #1809
  • bugfix: Dapr.Testcontainers: probe gRPC port with HTTP/2 preface to eliminate transient Unavailable on first RPC by @Copilot in #1821

Miscellaneous/Infrastructure

  • Modifying script tag retrieval script for build infra by @WhitWaldo in #1810
  • Adding minimum version tags to Jobs to reflect broader test coverage by @WhitWaldo in #1811
  • chore: Address flaky integration tests by @WhitWaldo in #1813
  • Bump OpenTelemetry.Exporter.OpenTelemetryProtocol from 1.15.0 to 1.15.3 by @dependabot[bot] in #1800
  • Adding rich backwards compatibility support to SDK by @WhitWaldo in #1816

New Contributors

Full Changelog: v1.17.9...v1.18.0-rc01