-
Notifications
You must be signed in to change notification settings - Fork 14.6k
MINOR: Fix failed e2e compatibility_test_new_broker_test and upgrade_test.py #20471
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
Conversation
# For backward compatibility, we select the configuration based on node version: | ||
# - For versions 4.2.0 and above, use --command-config | ||
# - For older versions, continue using --producer.config | ||
if node.version >= V_4_2_0: |
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.
Could you please consider adding a helper method to KafkaVersion
?
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.
Good idea. I have changed to use the new helper method.
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.
I have added another comment here: https://github.com/apache/kafka/pull/20390/files#r2321634022
@@ -424,7 +424,16 @@ def start_cmd(self, node): | |||
if self.max_messages > 0: | |||
cmd += " --max-messages %s" % str(self.max_messages) | |||
|
|||
cmd += " --command-config %s" % VerifiableConsumer.CONFIG_FILE | |||
version = get_version(node) | |||
# According to KIP-1147, --consumer.config has been deprecated and will be removed in future versions. |
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.
Can we move these comments to version.supports_command_config() method?
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.
@omkreddy Thanks for your comments, sorry for my carelessness and I have addressed them.
c9aee70
to
f1d2c19
Compare
388b62b
to
d30fbca
Compare
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, assuming system tests pass.
#20390 Replace the -
-producer.config
for the verifiable producer and--consumer.config
option by--command-config
for the verifiable consumer. However, for e2e tests targeting older broker versions, the original configuration should still be used.Fix the following tests:
consumer_protocol_migration_test.py
、compatibility_test_new_broker_test.py
andupgrade_test.py
.My local test result before change:


After: