-
Notifications
You must be signed in to change notification settings - Fork 461
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
Incorrect batch unwrapping in JSON-RPC replay tool #7279
Conversation
- Specialize for the only use case
- Fixes double enumeration
- Broke `NullJsonRpcSubmitter` in dry runs
yield return new JsonRpc.SingleJsonRpc(JsonDocument.Parse(single.ToString())); | ||
} | ||
} | ||
yield return new JsonRpc.BatchJsonRpc(jsonDoc); |
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.
A double enumeration happens here: if we unwrap batches we yield the batch elements, but we also yield the batch request at the end (most likely a missing else
branch)
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.
yield return new JsonRpc.SingleJsonRpc(JsonDocument.Parse(single.ToString())); | ||
} | ||
} | ||
yield return new JsonRpc.BatchJsonRpc(jsonDoc); |
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.
Changes
-d | --dry
mode due to incorrectnull
handling.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
As mentioned in #6366 (comment) we need to introduce a proper test suite before adding any new features to Kute.
Documentation
Requires documentation update
Requires explanation in Release Notes