Skip to content

Commit

Permalink
Implement PR change requests: fewer versions for travis testing, remo…
Browse files Browse the repository at this point in the history
…ve unused older versions for inference code, remove one minor version from known server list

Do not use newly created ACL request / responses in allowed version lists, due to flexible versions enabling in kafka actually requiring a serialization protocol header update
Revert admin client file change
  • Loading branch information
Gabriel Tincu committed May 4, 2020
1 parent 3952b9a commit f1aa128
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 210 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ env:
- KAFKA_VERSION=0.10.2.2
- KAFKA_VERSION=0.11.0.3
- KAFKA_VERSION=1.1.1
- KAFKA_VERSION=2.0.1
- KAFKA_VERSION=2.1.1
- KAFKA_VERSION=2.2.0
- KAFKA_VERSION=2.3.0
- KAFKA_VERSION=2.4.0
- KAFKA_VERSION=2.5.0

Expand Down
2 changes: 1 addition & 1 deletion build_integration.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

: ${ALL_RELEASES:="0.8.2.2 0.9.0.1 0.10.1.1 0.10.2.2 0.11.0.3 1.0.2 1.1.1 2.0.1 2.1.1 2.2.0 2.2.1 2.3.0 2.4.0 2.5.0"}
: ${ALL_RELEASES:="0.8.2.2 0.9.0.1 0.10.1.1 0.10.2.2 0.11.0.3 1.0.2 1.1.1 2.0.1 2.1.1 2.2.1 2.3.0 2.4.0 2.5.0"}
: ${SCALA_VERSION:=2.11}
: ${DIST_BASE_URL:=https://archive.apache.org/dist/kafka/}
: ${KAFKA_SRC_GIT:=https://github.com/apache/kafka.git}
Expand Down
8 changes: 2 additions & 6 deletions kafka/conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from kafka.future import Future
from kafka.metrics.stats import Avg, Count, Max, Rate
from kafka.oauth.abstract import AbstractTokenProvider
from kafka.protocol.admin import SaslHandShakeRequest, DescribeAclsRequest
from kafka.protocol.admin import SaslHandShakeRequest, DescribeAclsRequest_v2
from kafka.protocol.commit import OffsetFetchRequest
from kafka.protocol.offset import OffsetRequest
from kafka.protocol.produce import ProduceRequest
Expand Down Expand Up @@ -1169,7 +1169,7 @@ def _infer_broker_version_from_api_versions(self, api_versions):
# in reverse order. As soon as we find one that works, return it
test_cases = [
# format (<broker version>, <needed struct>)
((2, 5, 0), DescribeAclsRequest[2]),
((2, 5, 0), DescribeAclsRequest_v2),
((2, 4, 0), ProduceRequest[8]),
((2, 3, 0), FetchRequest[11]),
((2, 2, 0), OffsetRequest[5]),
Expand All @@ -1180,10 +1180,6 @@ def _infer_broker_version_from_api_versions(self, api_versions):
((0, 11, 0), MetadataRequest[4]),
((0, 10, 2), OffsetFetchRequest[2]),
((0, 10, 1), MetadataRequest[2]),
# taken from https://github.com/edenhill/librdkafka/blob/master/src/rdkafka_feature.c#L234
((0, 9, 0), ProduceRequest[1]),
((0, 8, 2), OffsetFetchRequest[1]),
((0, 8, 1), OffsetFetchRequest[0]),
]

# Get the best match of test cases
Expand Down
4 changes: 2 additions & 2 deletions kafka/protocol/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ class DescribeAclsRequest_v2(Request):
SCHEMA = DescribeAclsRequest_v1.SCHEMA


DescribeAclsRequest = [DescribeAclsRequest_v0, DescribeAclsRequest_v1, DescribeAclsRequest_v2]
DescribeAclsResponse = [DescribeAclsResponse_v0, DescribeAclsResponse_v1, DescribeAclsResponse_v2]
DescribeAclsRequest = [DescribeAclsRequest_v0, DescribeAclsRequest_v1]
DescribeAclsResponse = [DescribeAclsResponse_v0, DescribeAclsResponse_v1]

class CreateAclsResponse_v0(Response):
API_KEY = 30
Expand Down
147 changes: 0 additions & 147 deletions servers/2.2.0/resources/kafka.properties

This file was deleted.

4 changes: 0 additions & 4 deletions servers/2.2.0/resources/kafka_server_jaas.conf

This file was deleted.

25 changes: 0 additions & 25 deletions servers/2.2.0/resources/log4j.properties

This file was deleted.

21 changes: 0 additions & 21 deletions servers/2.2.0/resources/zookeeper.properties

This file was deleted.

0 comments on commit f1aa128

Please sign in to comment.