feat: Implement Dapr.StateManagement package#1806
Conversation
…ackage Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/7ecd6668-69d9-4165-a773-49bbe8e3b4cf Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
…<> alignment Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/393269e7-0b77-46e5-b002-ce1e9e547858 Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
…ator csproj and FNV hash Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/393269e7-0b77-46e5-b002-ce1e9e547858 Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
…, generic Serialize<T> overload Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/63945548-1b45-4e00-8494-4af62136db8b Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1806 +/- ##
==========================================
- Coverage 65.01% 63.46% -1.55%
==========================================
Files 300 312 +12
Lines 8874 9279 +405
Branches 1043 1101 +58
==========================================
+ Hits 5769 5889 +120
- Misses 2848 3130 +282
- Partials 257 260 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot This project is failing to build. Can you give it another pass? |
…use new AddDaprClient<> factory delegates Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/4e81dcdf-2201-490f-9729-b9ae4477ab19 Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Fixed in 9ab98d1. Two root causes:
Full solution now builds cleanly; 74 |
|
@copilot Could you please contrast this implementation, including the IDaprSerializer functionality, against what's currently available via the |
Good question — here's a complete comparison of the two serialization paths. Wire format (bytes on disk)Both clients send/receive UTF-8 encoded JSON in the gRPC
The on-wire representation is identical — both produce the same UTF-8 JSON bytes. Data written by one client can be read correctly by the other. JSON serializer options (the critical part)Both builders inherit from this.JsonSerializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web);
The new JsonDaprSerializer(this.JsonSerializerOptions) // same Web defaults, same as DaprClientBuilderSo the effective defaults at the builder/DI level are identical to One small difference: null value handling
Both produce the same logical result ( Conclusion: There are no breaking changes. Data written by |
…ates Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/efd845cf-f218-49e7-9852-56275b7b66d7 Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Fixed in f897218. |
WhitWaldo
left a comment
There was a problem hiding this comment.
One follow-up question about the implementation
| /// <returns>The <typeparamref name="TServiceBuilder"/> that wraps the service collection for further configuration.</returns> | ||
| internal static TServiceBuilder AddDaprClient<TClient, TConcreteClient, TServiceBuilder, TClientBuilder>( | ||
| this IServiceCollection services, | ||
| Func<IConfiguration?, TClientBuilder> clientBuilderFactory, |
There was a problem hiding this comment.
I'm concerned that adding this here means that every single client using this method is going to have to be updated accordingly. Is this strictly necessary or can it be added as an overload?
There was a problem hiding this comment.
Done in 775b1f6. The original AddDaprClient overload (using reflection) has been restored alongside the new factory-delegate overload. Jobs, AI, Cryptography, DistributedLock, Messaging, and SecretsManagement all revert to the simpler (configure, lifetime) signature — no factory delegates required. Only the new StateManagement package uses the factory-delegate overload.
…nagement callers to simple signature Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/f4eda1e6-677a-4751-aeaa-098514c593ef Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
…ll SDK packages Agent-Logs-Url: https://github.com/dapr/dotnet-sdk/sessions/0d2a40f1-c90e-4c5e-8319-5f831fc3b83a Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.