-
Notifications
You must be signed in to change notification settings - Fork 296
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
Make the kafka package dependency optional to be able to use confluent_kafka #351
Comments
Yes, let's explore. Cf. #336 for the same idea for the postgres container. We'd have to figure out what the default behavior should be, e.g.,
|
For kafka, the only dependency is on the connect checks. So an idea would be to program the "checks" outside the class and use them conditionally. It would then need two extras, one depending on confluent-kafka, one on kafka-python:
(Written into the github window, not tested...) |
Do you think it would be feasible to use |
The java testcontainer seem to think so: https://github.com/testcontainers/testcontainers-java/blob/main/modules/kafka/src/main/java/org/testcontainers/containers/KafkaContainer.java#L136-L143 protected void configure() {
if (this.kraftEnabled) {
waitingFor(Wait.forLogMessage(".*Transitioning from RECOVERY to RUNNING.*", 1));
configureKraft();
} else {
waitingFor(Wait.forLogMessage(".*\\[KafkaServer id=\\d+\\] started.*", 1));
configureZookeeper();
}
} |
Great, let's do that. Would be nice to bring the implementations closer, too. |
#377) Use `wait_for_logs` to wait for startup instead of waiting for successful connection via kafka-python. Also removes the dependency on kafka-python. Closes #351 --------- Co-authored-by: Gudjon Ragnar Brynjarsson <[email protected]>
testcontainers#377) Use `wait_for_logs` to wait for startup instead of waiting for successful connection via kafka-python. Also removes the dependency on kafka-python. Closes testcontainers#351 --------- Co-authored-by: Gudjon Ragnar Brynjarsson <[email protected]>
Describe the bug
We use confluent_kafka in the project and it's strange that we need another kafka sdk (kafka-python) just to check that the container is running.
To Reproduce
Install testcontainers-kafka -> observe that a kafka-python gets installed
The text was updated successfully, but these errors were encountered: