-
Notifications
You must be signed in to change notification settings - Fork 345
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
Marked bulk state Value
property as nullable
#1259
Marked bulk state Value
property as nullable
#1259
Conversation
…l value (which it will if a key doesn't have any data in the state store). Only enabled nullable annotation on this file for now. Signed-off-by: Whit Waldo <[email protected]>
Value
property as nullable
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1259 +/- ##
=======================================
Coverage 67.28% 67.28%
=======================================
Files 174 174
Lines 6025 6025
Branches 671 671
=======================================
Hits 4054 4054
Misses 1802 1802
Partials 169 169
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Value
property as nullableValue
property as nullable
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.
Adding null-ability on a case-by-case basis is probably the best we can do at the moment as, despite being tremendously useful (in my opinion), a SDK-wide review is unlikely to rise to the top of any priority stack.
Thanks for taking a look at this!
@holopin-bot @WhitWaldo Thank you! |
Congratulations @WhitWaldo, you just earned a badge! Here it is: https://holopin.io/claim/clvdvmzf685870fl5k95i2jrb This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
…l value (which it will if a key doesn't have any data in the state store). Only enabled nullable annotation on this file for now. (dapr#1259) Signed-off-by: Whit Waldo <[email protected]> Co-authored-by: Phillip Hoff <[email protected]> Signed-off-by: Divya Perumal <[email protected]>
Description
If a request is made for bulk state for a set of keys for which there isn't matching data, a null value is returned for that key in the result. An issue was raised that indicated that the value isn't marked as nullable, so the author was surprised to find that the value for an unregistered key returned null given that so many other packages are marked with such annotations these days.
As such, I marked the file (not the larger project) with nullable annotations and indicated that the
Value
property is nullable as well. This requires no changes on the Dapr sidecar itself and simply updates the C# package to reflect what's already returned so developers are up to speed on expectations.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: #1255
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: