-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add overload to deserialize GetBulkStateAsync item values #1173
Conversation
…ased deserialization of returned values instead of strictly returning serialized strings. Signed-off-by: Whit Waldo <[email protected]>
…e other (typed or not) Signed-off-by: Whit Waldo <[email protected]>
…ialized nature of the value. Signed-off-by: Whit Waldo <[email protected]>
…h the non-generic and generic public methods can deserialize the data once as necessary. Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1173 +/- ##
==========================================
+ Coverage 67.28% 67.36% +0.08%
==========================================
Files 174 174
Lines 6006 6028 +22
Branches 670 672 +2
==========================================
+ Hits 4041 4061 +20
- Misses 1798 1800 +2
Partials 167 167
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just some formatting nitpicks.
…ion requires each have their own line. Signed-off-by: Whit Waldo <[email protected]>
@halspang @philliphoff is this ready for merge? just checking since there's a corresponding docs PR waiting in the wings for this :) |
@hhunter-ms @halspang If Hal is ok with the last set to changes he requested (and the required merge is clean), I say merge it. |
Adds overload to BulkStateItem and GetBulkStateAsync to perform SDK-based deserialization of returned values instead of strictly returning serialized strings.
Signed-off-by: Whit Waldo [email protected]
Description
Explained in more detail at #1172 , but
GetBulkItemAsync
returns aBulkStateItem
with a Key, ETag and Value wherein each is typed as a string and the user is expected to deserialize the Value. Because the state might have been originally added one by one, relying on Dapr and its serialization options to serialize everything, this can cause downstream issues deserializing values not originally serialized by the developer.As such, just as
GetStateAsync
allows a type parameter to deserialize each returned value, I've added the same overload toGetBulkItemAsync
to deserialize using the same mechanism asGetStateAsync
to deserialize each of the returned items as part of an overloaded and generically-typedBulkItemState
.Issue reference
As it's a simple addition, I didn't think it really merited a lot of discussion as the functionality is already available for single items (and this just adds the same for multiple items).
Please reference the issue this PR will close: #1172
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
I'll work on finding relevant documentation and updating that right now.