wbarnha / kafka-python-ng

Fork for Python client for Apache Kafka
https://wbarnha.github.io/kafka-python-ng/
Apache License 2.0
42 stars 4 forks source link

client_async: Allow throwing an exception upon socket error during wakeup #134

Closed wbarnha closed 3 months ago

wbarnha commented 3 months ago

Motivation

When wakeup() is called, we sometime notice that we get an endless prints: "Unable to send to wakeup socket!". Those prints are spamming the logs.

Description

This commit aims to address it by allowing restating the application via an intentional exception raise. This behavior is configurable and its default is backward compatible.

We see this issue with kafka-python 2.0.2


This change is Reviewable

shimon-armis commented 3 months ago

@wbarnha Nice! So, what's missing for merging this (I didn't see any assigned reviewers, so not sure whose approval you're waiting for?).

wbarnha commented 3 months ago

@wbarnha Nice! So, what's missing for merging this (I didn't see any assigned reviewers, so not sure whose approval you're waiting for?).

Just wanted to reread it one nore time. LGTM!

shimon-armis commented 3 months ago

@wbarnha Is this going to be merged also to the dpkp/kafka-python repo?

wbarnha commented 3 months ago

@wbarnha Is this going to be merged also to the dpkp/kafka-python repo?

Yes, however, the main kafka-python repository is going to contain a set of very carefully managed releases. I only want to start merging more things in once I have full control over the release schedule of the project.

The PRs that have already been merged are presumably uncontroversial to the parties to would object to me creating a release. I apologize for not being upfront, there are some things going on behind the scenes that bar me from going wild on merging things. I have a lax policy on accepting PRs because it encourages community interaction and the dopamine hit I presume people get from seeing their code get merged motivates them further. I do not like standing in the way of such gratification since it's one of the main reasons I originally got involved with open source contributions. I need all the help I can get in terms of maintaining projects.

shimon-armis commented 3 months ago

@wbarnha Is this going to be merged also to the dpkp/kafka-python repo?

Yes, however, the main kafka-python repository is going to contain a set of very carefully managed releases. I only want to start merging more things in once I have full control over the release schedule of the project.

The PRs that have already been merged are presumably uncontroversial to the parties to would object to me creating a release. I apologize for not being upfront, there are some things going on behind the scenes that bar me from going wild on merging things. I have a lax policy on accepting PRs because it encourages community interaction and the dopamine hit I presume people get from seeing their code get merged motivates them further. I do not like standing in the way of such gratification since it's one of the main reasons I originally got involved with open source contributions. I need all the help I can get in terms of maintaining projects.

Thanks for the honest answer. I actually got involved with open source projects with the same reason. I do understand the caution taken when merging code into master, though. In any case, do you have any estimation when will it be merged to the dpkp/kafka-python?

wbarnha commented 3 months ago

@wbarnha Is this going to be merged also to the dpkp/kafka-python repo?

Yes, however, the main kafka-python repository is going to contain a set of very carefully managed releases. I only want to start merging more things in once I have full control over the release schedule of the project. The PRs that have already been merged are presumably uncontroversial to the parties to would object to me creating a release. I apologize for not being upfront, there are some things going on behind the scenes that bar me from going wild on merging things. I have a lax policy on accepting PRs because it encourages community interaction and the dopamine hit I presume people get from seeing their code get merged motivates them further. I do not like standing in the way of such gratification since it's one of the main reasons I originally got involved with open source contributions. I need all the help I can get in terms of maintaining projects.

Thanks for the honest answer. I actually got involved with open source projects with the same reason. I do understand the caution taken when merging code into master, though. In any case, do you have any estimation when will it be merged to the dpkp/kafka-python?

Either when my PEP 541 request gets accepted (I'll open one tomorrow, I don't have the energy to go through the internal email chain I've had with past maintainers), or if Dana gets back to me. We've tried reaching him multiple times but has been MIA since December.

wbarnha commented 3 months ago

If the answer seems vague, that's because it is. I don't know either and I apologize for the lack of clarity.

shimon-armis commented 3 months ago

If the answer seems vague, that's because it is. I don't know either and I apologize for the lack of clarity.

That's o.k :) I appreciate your honesty and your prompt response.