-
Notifications
You must be signed in to change notification settings - Fork 15.4k
MINOR: fix client_compatibility_features_test.py #10292
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
Changes from 3 commits
11feb2d
7e49684
55197e7
a15166b
b724ffd
0c22ff6
f541425
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,8 +81,12 @@ def __init__(self, test_context): | |
| self.kafka = KafkaService(test_context, num_nodes=3, zk=self.zk, topics=self.topics) | ||
|
|
||
| def invoke_compatibility_program(self, features): | ||
| # Run the compatibility test on the first Kafka node. | ||
| node = self.kafka.nodes[0] | ||
| if self.zk: | ||
| # kafka nodes are set to older version so resolved script path is linked to older assembly. | ||
| # run the compatibility test on the first zk node to get script path linked to latest(dev) assembly. | ||
| node = self.zk.nodes[0] | ||
| else: | ||
| node = self.kafka.nodes[0] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can use the dev version of the tool on the Kafka node via code like this: And then further down we can define the DEV script path like this: I tested this locally and it solves the problem.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. copy that |
||
| cmd = ("%s org.apache.kafka.tools.ClientCompatibilityTest " | ||
| "--bootstrap-server %s " | ||
| "--num-cluster-nodes %d " | ||
|
|
@@ -130,4 +134,8 @@ def run_compatibility_test(self, broker_version, metadata_quorum=quorum.zk): | |
| self.kafka.set_version(KafkaVersion(broker_version)) | ||
| self.kafka.start() | ||
| features = get_broker_features(broker_version) | ||
| if not self.zk: | ||
| # this check/disabling is only necessary due to the fact that we are in early access mode with | ||
| # KIP-500 and we should remove the special casing when that his fully implemented | ||
| features["describe-acls-supported"] = False | ||
| self.invoke_compatibility_program(features) | ||
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.
nit: no need to remove this comment. Otherwise LGTM -- thank you again!
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.
will copy that.