Skip to content

Commit

Permalink
Merge pull request #140 from aiven/hacka/update-kafka-python-dependency
Browse files Browse the repository at this point in the history
Update kafka-python and fix api change.
  • Loading branch information
Mikko Saarinen authored Jan 18, 2021
2 parents 72f6fa1 + a3ca703 commit 022063f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion karapace/kafka_rest_apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def init_admin_client(self):
api_version=(1, 0, 0),
metadata_max_age_ms=self.config["metadata_max_age_ms"],
connections_max_idle_ms=self.config["connections_max_idle_ms"],
client_factory=KarapaceKafkaClient,
kafka_client=KarapaceKafkaClient,
)
break
except: # pylint: disable=bare-except
Expand Down
2 changes: 1 addition & 1 deletion karapace/karapace.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _create_producer(self):
metadata_max_age_ms=self.config["metadata_max_age_ms"],
max_block_ms=2000, # missing topics will block unless we cache cluster metadata and pre-check
connections_max_idle_ms=self.config["connections_max_idle_ms"], # helps through cluster upgrades ??
client_factory=KarapaceKafkaClient,
kafka_client=KarapaceKafkaClient,
)
except: # pylint: disable=bare-except
self.log.exception("Unable to create producer, retrying")
Expand Down
6 changes: 3 additions & 3 deletions karapace/schema_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def init_consumer(self):
ssl_keyfile=self.config["ssl_keyfile"],
auto_offset_reset="earliest",
metadata_max_age_ms=self.config["metadata_max_age_ms"],
client_factory=KarapaceKafkaClient,
kafka_client=KarapaceKafkaClient,
)

def init_producer(self):
Expand All @@ -64,7 +64,7 @@ def init_producer(self):
ssl_cafile=self.config["ssl_cafile"],
ssl_certfile=self.config["ssl_certfile"],
ssl_keyfile=self.config["ssl_keyfile"],
client_factory=KarapaceKafkaClient,
kafka_client=KarapaceKafkaClient,
)

def init_admin_client(self):
Expand All @@ -83,7 +83,7 @@ def init_admin_client(self):
ssl_cafile=self.config["ssl_cafile"],
ssl_certfile=self.config["ssl_certfile"],
ssl_keyfile=self.config["ssl_keyfile"],
client_factory=KarapaceKafkaClient,
kafka_client=KarapaceKafkaClient,
)
break
except (NodeNotReadyError, NoBrokersAvailable, AssertionError):
Expand Down
2 changes: 1 addition & 1 deletion karapace/schema_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def init_consumer(self):
auto_offset_reset="earliest",
session_timeout_ms=session_timeout_ms,
request_timeout_ms=request_timeout_ms,
client_factory=KarapaceKafkaClient,
kafka_client=KarapaceKafkaClient,
metadata_max_age_ms=self.config["metadata_max_age_ms"],
)

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
git+https://github.com/aiven/avro.git@skip-namespace-validation#subdirectory=lang/py3/
git+git://github.com/aiven/kafka-python.git@39a372538c6bdfbfcb7852c36bed5de61e34bad8
git+git://github.com/aiven/kafka-python.git@346c01e4eec6bdcccc99ca613b79020f3be35eb7
yapf==0.30.0
aiohttp-socks==0.5.5
pylint==2.4.4
Expand Down

0 comments on commit 022063f

Please sign in to comment.