Skip to content

KAFKA-17715: Remove argument force_use_zk_connection from e2e #19209

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

Open
wants to merge 8 commits into
base: trunk
Choose a base branch
from

Conversation

mingyen066
Copy link
Collaborator

@mingyen066 mingyen066 commented Mar 14, 2025

The e2e tests currently cover version 2.1.0 and above. Thus, we can remove force_use_zk_connection in kafka_acls_cmd_with_optional_security_settings

In contrast, the force_use_zk_connection in kafka_topics_cmd_with_optional_security_settings and kafka_configs_cmd_with_optional_security_settings still needs to be kept as kafka-topics.sh does not support --bootstrap-server in 2.1 and 2.2

e2e test result:

====================================================
SESSION REPORT (ALL TESTS)
ducktape version: 0.12.0
session_id:       2025-03-22--001
run time:         213 minutes 29.834 seconds
tests run:        98
passed:           98
flaky:            0
failed:           0
ignored:          0
====================================================

@github-actions github-actions bot added triage PRs from the community tests Test fixes (including flaky tests) labels Mar 14, 2025
@mingyen066 mingyen066 marked this pull request as ready for review March 14, 2025 12:29
@mingyen066 mingyen066 changed the title KAFKA-17715: Remove argument force_use_zk_connection from e2e KAFKA-17715: Remove argument force_use_zk_connection from e2e [WIP] Mar 14, 2025
@mingyen066 mingyen066 changed the title KAFKA-17715: Remove argument force_use_zk_connection from e2e [WIP] KAFKA-17715: Remove argument force_use_zk_connection from e2e Mar 16, 2025
Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

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

@mingyen066 : Thanks for the patch.
Could you provide the e2e result?

Copy link
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

It seems some test will fail by this PR, @mingyen066 could you take a look?

====================================================================================================
SESSION REPORT (ALL TESTS)
ducktape version: 0.12.0
session_id:       2025-03-18--001
run time:         1 minute 34.047 seconds
tests run:        2
passed:           1
flaky:            0
failed:           1
ignored:          0
====================================================================================================
test_id:    kafkatest.tests.client.client_compatibility_features_test.ClientCompatibilityFeaturesTest.run_compatibility_test.broker_version=2.1.1
status:     FAIL
run time:   49.146 seconds


    RemoteCommandError({'ssh_config': {'host': 'ducker05', 'hostname': 'ducker05', 'user': 'ducker', 'port': 22, 'password': '', 'identityfile': '/home/ducker/.ssh/id_rsa', 'connecttimeout': None}, 'hostname': 'ducker05', 'ssh_hostname': 'ducker05', 'user': 'ducker', 'externally_routable_ip': 'ducker05', '_logger': <Logger kafkatest.tests.client.client_compatibility_features_test.ClientCompatibilityFeaturesTest.run_compatibility_test.broker_version=2.1.1-1 (DEBUG)>, 'os': 'linux', '_ssh_client': <paramiko.client.SSHClient object at 0x746b1cc167b8>, '_sftp_client': <paramiko.sftp_client.SFTPClient object at 0x746b1cc26940>, '_custom_ssh_exception_checks': None}, '/opt/kafka-2.1.1/bin/kafka-topics.sh --bootstrap-server ducker05:9092,ducker06:9092,ducker07:9092 --create --topic client_compat_features_topic_1742311794990920825  --partitions 1 --replication-factor 3', 1, b'Exception in thread "main" joptsimple.UnrecognizedOptionException: bootstrap-server is not a recognized option\n\tat joptsimple.OptionException.unrecognizedOption(OptionException.java:108)\n\tat joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:510)\n\tat joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:56)\n\tat joptsimple.OptionParser.parse(OptionParser.java:396)\n\tat kafka.admin.TopicCommand$TopicCommandOptions.<init>(TopicCommand.scala:361)\n\tat kafka.admin.TopicCommand$.main(TopicCommand.scala:44)\n\tat kafka.admin.TopicCommand.main(TopicCommand.scala)\n')
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/ducktape/tests/runner_client.py", line 351, in _do_run
    data = self.run_test()
  File "/usr/local/lib/python3.7/dist-packages/ducktape/tests/runner_client.py", line 411, in run_test
    return self.test_context.function(self.test)
  File "/usr/local/lib/python3.7/dist-packages/ducktape/mark/_mark.py", line 438, in wrapper
    return functools.partial(f, *args, **kwargs)(*w_args, **w_kwargs)
  File "/opt/kafka-dev/tests/kafkatest/tests/client/client_compatibility_features_test.py", line 134, in run_compatibility_test
    self.kafka.start()
  File "/opt/kafka-dev/tests/kafkatest/services/kafka/kafka.py", line 684, in start
    self.create_topic(topic_cfg)
  File "/opt/kafka-dev/tests/kafkatest/services/kafka/kafka.py", line 1239, in create_topic
    node.account.ssh(cmd)
  File "/usr/local/lib/python3.7/dist-packages/ducktape/cluster/remoteaccount.py", line 35, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/ducktape/cluster/remoteaccount.py", line 310, in ssh
    raise RemoteCommandError(self, cmd, exit_status, stderr.read())
ducktape.cluster.remoteaccount.RemoteCommandError: ducker@ducker05: Command '/opt/kafka-2.1.1/bin/kafka-topics.sh --bootstrap-server ducker05:9092,ducker06:9092,ducker07:9092 --create --topic client_compat_features_topic_1742311794990920825  --partitions 1 --replication-factor 3' returned non-zero exit status 1. Remote error message: b'Exception in thread "main" joptsimple.UnrecognizedOptionException: bootstrap-server is not a recognized option\n\tat joptsimple.OptionException.unrecognizedOption(OptionException.java:108)\n\tat joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:510)\n\tat joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:56)\n\tat joptsimple.OptionParser.parse(OptionParser.java:396)\n\tat kafka.admin.TopicCommand$TopicCommandOptions.<init>(TopicCommand.scala:361)\n\tat kafka.admin.TopicCommand$.main(TopicCommand.scala:44)\n\tat kafka.admin.TopicCommand.main(TopicCommand.scala)\n'

@github-actions github-actions bot removed the triage PRs from the community label Mar 19, 2025
@github-actions github-actions bot added the small Small PRs label Mar 22, 2025
@mingyen066
Copy link
Collaborator Author

@m1a2st Thanks for spotting the failed test. It turns out we cannot remove the force_use_zk_connection in kafka_topics_cmd_with_optional_security_settings because kafka-topics.sh does not support --bootstrap-server in 2.1 and 2.2.

def topic_command_supports_bootstrap_server(self):
return self >= V_2_3_0

@mingyen066
Copy link
Collaborator Author

@frankvicky @m1a2st
I pasted the test results that passed into the PR body.

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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants