Skip to content
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

Update kafka-python and fix api change. #140

Merged
1 commit merged into from
Jan 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -55,7 +55,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 @@ -51,7 +51,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 @@ -61,7 +61,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 @@ -80,7 +80,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.3.4
pylint==2.4.4
Expand Down