-
Notifications
You must be signed in to change notification settings - Fork 537
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
Make handle parsing/decoding functions idempotent #21102
Make handle parsing/decoding functions idempotent #21102
Conversation
⯆ @fluid-example/bundle-size-tests: -139 Bytes
Baseline commit: 1018e0f |
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.
Change looks ok to me but I'm not an expert in the area, skipping approval so someone with more context reviews as well. Just a small nit below.
Co-authored-by: Alex Villarreal <[email protected]>
FYI--'reviewer guidance' section needs update. Mark and I looked into these failures just now and verified that the same failure JSON (i.e. sequence of steps) doesn't reproduce the assert today. Since the original PR, there have been a few fixes to SharedString/merge-tree which are plausibly what fixed the issue. Notably, we fixed an issue where objects in SharedString ops would be reference-equal to property bags in the string. It would make sense removing the round-trip in that PR would cause bad behavior given the existence of this bug at the time. |
Fixes microsoft#8016. We need to port this back to RC3 and RC4 once merged to main. For anyone implementing their own DDS, when they pick up an FF release with microsoft#19242 in it, they will likely be in a position where handles are going through `parseHandles` or `serializer.decode` twice. We assumed this was idempotent but found that it is not, with two different codepaths needing to be fixed. Note that `parseHandles` may return the same object unmodified now, wherease before it would always clone (via `JSON.stringify` roundtrip) --------- Co-authored-by: Alex Villarreal <[email protected]>
Fixes microsoft#8016. We need to port this back to RC3 and RC4 once merged to main. For anyone implementing their own DDS, when they pick up an FF release with microsoft#19242 in it, they will likely be in a position where handles are going through `parseHandles` or `serializer.decode` twice. We assumed this was idempotent but found that it is not, with two different codepaths needing to be fixed. Note that `parseHandles` may return the same object unmodified now, wherease before it would always clone (via `JSON.stringify` roundtrip) --------- Co-authored-by: Alex Villarreal <[email protected]>
#21169) Port #21102 to `release/client/2.0.0-rc.4.0` For anyone implementing their own DDS, when upgrading from `2.0.0-rc.2.0` to `2.0.0-rc.3.0` or later, they will likely be in a position where handles are going through `parseHandles` or `serializer.decode` twice. Without this fix, those functions are not idempotent and will hit a fatal error being called twice. Note that `parseHandles` may return the same object unmodified now, whereas before it would always clone (via `JSON.stringify` roundtrip) Co-authored-by: Alex Villarreal <[email protected]>
#21170) Port #21102 to `release/client/2.0.0-rc.3.0` For anyone implementing their own DDS, when upgrading from `2.0.0-rc.2.0` to `2.0.0-rc.3.0` or later, they will likely be in a position where handles are going through `parseHandles` or `serializer.decode` twice. Without this fix, those functions are not idempotent and will hit a fatal error being called twice. Note that `parseHandles` may return the same object unmodified now, whereas before it would always clone (via `JSON.stringify` roundtrip) Co-authored-by: Alex Villarreal <[email protected]>
Fixes microsoft#8016. We need to port this back to RC3 and RC4 once merged to main. For anyone implementing their own DDS, when they pick up an FF release with microsoft#19242 in it, they will likely be in a position where handles are going through `parseHandles` or `serializer.decode` twice. We assumed this was idempotent but found that it is not, with two different codepaths needing to be fixed. Note that `parseHandles` may return the same object unmodified now, wherease before it would always clone (via `JSON.stringify` roundtrip) --------- Co-authored-by: Alex Villarreal <[email protected]>
Description
Fixes AB#8016. We need to port this back to RC3 and RC4 once merged to main.
For anyone implementing their own DDS, when they pick up an FF release with #19242 in it, they will likely be in a position where handles are going through
parseHandles
orserializer.decode
twice.We assumed this was idempotent but found that it is not, with two different codepaths needing to be fixed.
Reviewer Guidance
This is a superset of #19716. In that discussion you'll see reference made to some DDS Fuzz test failures for particular seeds. Abram and I took the JSON from those failures and tested those scripts against main and they were fine, so proceeding.