-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement strict decoding for JetStream API requests #5858
Conversation
9beb4f6
to
6b84a9b
Compare
a9b2549
to
c4418f4
Compare
There's one failing test, but this is failing on main as-well so I don't think that's related. |
c4418f4
to
92bfdd6
Compare
Ran the meta benchmarks on this as they're pretty request heavy:
|
Currently failures to unmarshal only give a vague error of "invalid JSON", this adds the original error to it as context. Before: ```` invalid JSON ```` After: ``` invalid JSON: invalid character '\"' after object key ``` Related to but **not** dependent on #5858 Signed-off-by: Casper Beyer <[email protected]>
Mind rebasing this & resolving conflicts please? |
0f7aa53
to
b0144fc
Compare
b0144fc
to
50f27e4
Compare
Please make sure the strict option value is shown in jsz output |
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.
LGTM
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.
LGTM
This implements optional strict JSON decoding for JetStream.
The intent of this is to minimize accidental misalignments between server and clients, we've had numerous of these across the various clients, especially for rarely used fields in the request payloads.
Signed-off-by: Casper Beyer [email protected]