-
Notifications
You must be signed in to change notification settings - Fork 202
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
[RECALLED] Wrong value in state store when use custom json serializer #503
Comments
Please, do not extend ObjectSerializer, it is used for internal objects only. Simply, implement DaprObjectSerializer interface. The PR should focus on handling the content-type value correctly and not extending DefaultObjectSerializer. |
@abogdanov37 This fix must be undone because it is a breaking change. Data stored with the old version cannot be read with this patch. We are reverting this and undoing that fix in the patch release too. |
Should I add fallback to support old way? |
@abogdanov37 For this feature to be added, the old way should be the default and the new way must be opted in. The design would need to be a little bit creative here. Take your time to think about this. I am sorry for this but we are in a different mode now in post v1.0 where breaking changes are a big deal, specially when dealing with persisted data. Anyhow, I really appreciate your open mind here and willingness to contribute. |
I understand the problem with breaking changes. I take some time to think about the way and add changes. |
@artursouza I add new PR with some new tests. Please describe with more detail which state can't be deserialized. I spend many time but can't reproduce that behavior. |
@abogdanov37 Like we discussed in the issue, I will look into that before merging the PR. Ideally, I can come up with a new unit tests that can gate this regression. If my reading of the code is wrong, we can merge the PR. |
I use dapr v1.0.0. I wrote the actor use Java SDK. To use the right OffsetDateTime class serialization I wrote a custom Json serializer
class ISO8601DaprObjectSerializer extends ObjectSerializer implements DaprObjectSerializer
.Expected Behavior
When I use this serializer I want to see JSON in state store
Actual Behavior
Now in state store I see base64 encoded string. In this case, I should use a special deserialized object constructor with string parameter.
Steps to Reproduce the Problem
When register actor add custom serializer
Release Note
RELEASE NOTE: FIX Serialization bug in SDK where custom JSON serializer is handled as byte[]
The text was updated successfully, but these errors were encountered: