Skip to content

Add support for Bulk State, i.e. SaveBulkStateAsync(...) method#962

Merged
halspang merged 2 commits into
dapr:masterfrom
yash-nisar:master
Oct 31, 2022
Merged

Add support for Bulk State, i.e. SaveBulkStateAsync(...) method#962
halspang merged 2 commits into
dapr:masterfrom
yash-nisar:master

Conversation

@yash-nisar
Copy link
Copy Markdown
Contributor

@yash-nisar yash-nisar commented Sep 30, 2022

Closes #785

Signed-off-by: Yash Nisar yashnisar@microsoft.com

Description

Add support for Bulk State, i.e. sending multiple key value pairs to the dapr SaveState(...) API

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #785

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

@yash-nisar yash-nisar requested review from a team as code owners September 30, 2022 00:20
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 30, 2022

Codecov Report

Merging #962 (b8223be) into master (56017dd) will increase coverage by 0.10%.
The diff coverage is 84.21%.

@@            Coverage Diff             @@
##           master     #962      +/-   ##
==========================================
+ Coverage   69.80%   69.90%   +0.10%     
==========================================
  Files         156      157       +1     
  Lines        5186     5224      +38     
  Branches      555      562       +7     
==========================================
+ Hits         3620     3652      +32     
- Misses       1434     1439       +5     
- Partials      132      133       +1     
Flag Coverage Δ
net5 69.86% <84.21%> (+0.12%) ⬆️
net6 69.81% <84.21%> (+0.10%) ⬆️
netcoreapp3.1 69.85% <84.21%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Dapr.Client/DaprClient.cs 92.59% <ø> (ø)
src/Dapr.Client/DaprClientGrpc.cs 86.82% <77.77%> (-0.38%) ⬇️
src/Dapr.Client/SaveStateItem.cs 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@yash-nisar
Copy link
Copy Markdown
Contributor Author

Dapr.E2E.Test.E2ETests.TestServiceInvocation failing, seems unrelated to my change.

Copy link
Copy Markdown
Contributor

@halspang halspang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code itself is fine, but I think we should align more with the existing API. Shouldn't be a big change to switch it over.

Comment thread src/Dapr.Client/SaveBulkStateItem.cs Outdated
Comment thread src/Dapr.Client/SaveBulkStateItem.cs Outdated
@yash-nisar yash-nisar force-pushed the master branch 3 times, most recently from eb4670e to 3681e10 Compare October 5, 2022 13:57
@yash-nisar yash-nisar requested a review from halspang October 5, 2022 14:00
Copy link
Copy Markdown
Contributor

@halspang halspang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit-pick for some formatting.

Comment thread src/Dapr.Client/DaprClientGrpc.cs Outdated
Closes dapr#785

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
Copy link
Copy Markdown
Contributor

@halspang halspang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nits for the example now. Big thing you need is to add a reference to it in the README.

Comment thread examples/Client/StateManagement/BulkStateExample.cs Outdated
Comment thread examples/Client/StateManagement/BulkStateExample.cs Outdated
Comment thread examples/Client/StateManagement/BulkStateExample.cs Outdated
Comment thread examples/Client/StateManagement/Program.cs Outdated
Closes dapr#963

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
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.

Bulk State

2 participants