dt/tests: declare Kafka 4.2 in sarama compatibility tests#31073
Open
nguyen-andrew wants to merge 1 commit into
Open
dt/tests: declare Kafka 4.2 in sarama compatibility tests#31073nguyen-andrew wants to merge 1 commit into
nguyen-andrew wants to merge 1 commit into
Conversation
Sarama negotiates API versions and clamps down to the broker since v1.46, so declaring 4.x no longer risks sending requests the broker rejects. Add Kafka 4.2 (the pinned v1.48.0 library's max) to the declared-version matrix, alongside the existing 2.1 and 2.6.
Contributor
There was a problem hiding this comment.
Pull request overview
Expands the Sarama ducktape compatibility test matrix to declare Kafka protocol version 4.2.0 (in addition to 2.1.0 and 2.6.0), aligning with Sarama v1.48.0’s maximum supported Kafka version so CI validates Sarama behavior against 4.x.
Changes:
- Add
4.2.0to the declared Kafka version matrix for Sarama example-based compatibility tests. - Add
4.2.0to the Sarama produce compatibility test matrix. - Update the Go produce-test binary’s default
--versionto4.2.0.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/rptest/tests/compatibility/sarama_test.py | Extends declared Kafka version matrix for Sarama example tests to include 4.2.0. |
| tests/rptest/tests/compatibility/sarama_produce_test.py | Extends Sarama produce test matrix to include 4.2.0. |
| tests/go/sarama/produce_test/main.go | Changes default --version flag value to 4.2.0 (help text nit noted). |
| brokers = flag.String("brokers", "127.0.0.1:9092", "Th Redpanda brokers to connect to, as a comma separated list") | ||
| count = flag.Int64("count", 100, "Optional count to run") | ||
| version = flag.String("version", "2.1.0", "Kafka version to use, e.g. 2.1.0") | ||
| version = flag.String("version", "4.2.0", "Kafka version to use, e.g. 2.1.0") |
Collaborator
CI test resultstest results on build#86975
|
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.
The Sarama compatibility ducktape tests pinned a low declared Kafka
protocol version (2.1/2.6) because older Sarama did not auto-negotiate
API versions: declaring a newer version would make it send request
versions the broker might not support. Since v1.46 (and the pinned
v1.48.0), Sarama negotiates and clamps down to the broker's advertised
versions like the other validated clients, so declaring a 4.x version
is safe.
This adds Kafka 4.2.0 (the v1.48.0 library's max) to the declared-version
matrix in the Sarama tests, alongside the existing 2.1.0 and 2.6.0, so CI
validates Sarama against Kafka 4.x. The legacy
max_timestampfixturetest is intentionally left on its old declared version.
Related to CORE-16243
Backports Required
Release Notes