Skip to content
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 support for Bulk State, i.e. SaveBulkStateAsync(...) method #962

Merged
merged 2 commits into from
Oct 31, 2022

Conversation

yash-nisar
Copy link
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

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
Contributor Author

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

Copy link
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.

src/Dapr.Client/SaveBulkStateItem.cs Outdated Show resolved Hide resolved
src/Dapr.Client/SaveBulkStateItem.cs Outdated Show resolved Hide resolved
Copy link
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.

src/Dapr.Client/DaprClientGrpc.cs Outdated Show resolved Hide resolved
Closes dapr#785

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

examples/Client/StateManagement/BulkStateExample.cs Outdated Show resolved Hide resolved
examples/Client/StateManagement/BulkStateExample.cs Outdated Show resolved Hide resolved
examples/Client/StateManagement/Program.cs Show resolved Hide resolved
Closes dapr#963

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
@halspang halspang merged commit 1efe1fa into dapr:master Oct 31, 2022
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