Set etag to be null if it's empty#414
Conversation
a0e1733 to
95f8d0e
Compare
mukundansundar
left a comment
There was a problem hiding this comment.
lgtm.
@artursouza The issue linked to this should be a breaking change since the response is changing.
|
Yes, LGTM. Let's mark it as breaking change - even though it is minor. |
1f80e1c to
5e0dcd7
Compare
4c8de50 to
52cb9b7
Compare
|
@artursouza I debugged why
I am not sure if 1 is expected to be this way. If this is expected then we can keep it this way and let the test pass. 2 is not happening in unit tests because units tests don't cover a scenario of trying to retrieve a state object which is not saved at all. |
02d4a19 to
f58fee3
Compare
Signed-off-by: Arghya Sadhu <arghya88@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #414 +/- ##
============================================
- Coverage 83.27% 83.23% -0.04%
- Complexity 835 838 +3
============================================
Files 72 72
Lines 2487 2493 +6
Branches 255 258 +3
============================================
+ Hits 2071 2075 +4
- Misses 293 294 +1
- Partials 123 124 +1
Continue to review full report at Codecov.
|
|
@artursouza Pls review |
The reason why the etag is "1" and not null even when we set it to null is because Dapr maps etag to version in Redis. Version is always present in Redis, so it defaults to "1" when we set a value: https://github.com/dapr/components-contrib/blob/master/state/redis/redis.go This is why the integration tests asserts "1" for the null case. |
Signed-off-by: Arghya Sadhu arghya88@gmail.com
Description
Convert empty string to null for GRPC implementation to keep it consistent with HTTP implementation
Issue reference
Fixes #405
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: