dapr / dotnet-sdk

Dapr SDK for .NET
Apache License 2.0
1.12k stars 340 forks source link

Marked bulk state `Value` property as nullable #1259

Closed WhitWaldo closed 7 months ago

WhitWaldo commented 8 months ago

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:

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.28%. Comparing base (1b7c9f4) to head (728bda0). Report is 3 commits behind head on master.

:exclamation: Current head 728bda0 differs from pull request most recent head 76f9811. Consider uploading reports for the commit 76f9811 to get more accurate results

Additional details and impacted files ```diff @@ 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 ``` | [Flag](https://app.codecov.io/gh/dapr/dotnet-sdk/pull/1259/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dapr) | Coverage Δ | | |---|---|---| | [net6](https://app.codecov.io/gh/dapr/dotnet-sdk/pull/1259/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dapr) | `67.26% <100.00%> (ø)` | | | [net7](https://app.codecov.io/gh/dapr/dotnet-sdk/pull/1259/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dapr) | `67.26% <100.00%> (ø)` | | | [net8](https://app.codecov.io/gh/dapr/dotnet-sdk/pull/1259/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dapr) | `67.27% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dapr#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

marcduiker commented 7 months ago

@holopin-bot @WhitWaldo Thank you!

holopin-bot[bot] commented 7 months ago

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. Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!