Skip to content

Conversation

JimmyWang6
Copy link
Contributor

#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.pycompatibility_test_new_broker_test.py and upgrade_test.py.

My local test result before change:
image
After:
image

@github-actions github-actions bot added tests Test fixes (including flaky tests) small Small PRs triage PRs from the community labels Sep 3, 2025
# 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:
Copy link
Member

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?

Copy link
Contributor Author

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.

@github-actions github-actions bot removed the triage PRs from the community label Sep 4, 2025
Copy link
Contributor

@omkreddy omkreddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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.
Copy link
Contributor

@omkreddy omkreddy Sep 4, 2025

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@omkreddy omkreddy left a 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.

@omkreddy omkreddy merged commit 9257c43 into apache:trunk Sep 4, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved small Small PRs tests Test fixes (including flaky tests) tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants