Test v0 ApiVersions forwarding with IT#38
Merged
SamBarker merged 3 commits intoSamBarker:considlate-apiVersions-handlingfrom Jul 23, 2025
Merged
Conversation
* Makes the test KafkaClient less smart, it must be told the expected response apiVersion, rather than implementing a fallback if it cannot understand the response. This means that our test that expects to successfully decode a v0 ApiVersions response would fail if it received a message encoded with another apiVersion. * Fixed the MockServer constructor, it wasn't wiring up the response apiVersion correctly. * Fixed a problem where an error at decode time in the test client resulted in a timeout. If we've obtained a correlation, then we can complete the response future exceptionally. This makes the test fail faster if the message can't be decoded at the expected version. Signed-off-by: Robert Young <robeyoun@redhat.com>
Signed-off-by: Robert Young <robeyoun@redhat.com>
9 tasks
We want to use KafkaClient to declare what response apiVersion we expect the proxy to respond with. The kafka-client code we depend on to read the messages will sometimes be backwards compatible, for example if we try to read a v1 or v2 ApiVersions response message, then it will successfully read the v0 portion of the message, leaving some additional fields like throttleTimeMs unread. By KIP-511 the contract is we will send a v0 response, not a v0 compatible response, so I think it's good for the test client to require that all bytes are read at the response apiVersion we declare we expect. Signed-off-by: Robert Young <robeyoun@redhat.com>
Owner
|
Merging I'll address the test failure on the main PR |
31232bb
into
SamBarker:considlate-apiVersions-handling
2 of 3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Description
Test ApiVersions v0 upstream response is forwarded
a v0 ApiVersions response would fail if it received a message encoded with another apiVersion.
Checklist
Please go through this checklist and make sure all applicable tasks have been done