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

Added Kafka (KRaft Mode) module #1034

Closed
wants to merge 1 commit into from
Closed

Conversation

noctarius
Copy link

What does this PR do?

This PR adds a new module for Kafka, running in KRaft (Zookeeper-less) mode

Why is it important?

New modules are always important :-)

Related issues

How to test this PR

Simple test for the module is included

@noctarius noctarius requested a review from a team as a code owner April 4, 2023 10:45
@netlify
Copy link

netlify bot commented Apr 4, 2023

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit fbb2799
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/642c23bb1fffbe0008f7091f
😎 Deploy Preview https://deploy-preview-1034--testcontainers-go.netlify.app/modules/kafka
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@mdelapenya
Copy link
Collaborator

Hi @noctarius this is awesome! I have one question regarding how you created the scaffolding, as I'm not sure if you used the module generator tool, as described here?

It will generate the scaffolding and will automatically add it to the docs site (golang.testcontainers.org).

@noctarius
Copy link
Author

I just copy and pasted what I found for other modules, so no, I didn't use the tool 🤷‍♂️
Let me run it now and see what comes out of it

@sonarcloud
Copy link

sonarcloud bot commented Apr 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mdelapenya
Copy link
Collaborator

Hey @noctarius sorry for the radio silence, but we have been working on a more consistent module design, so I'd ask you to visit the docs on how to adhere to this design here: https://golang.testcontainers.org/modules/

In two sentences, the entrypoint must be RunContainer(ctx, opts ...testcontainers.ContainerCustomizer and we explain there how to create own in-module customizers. The Couchbase module is a good place to look at how to transfer state from the container request to the running container where there is data that does not belong to the container request type.

I'd be very happy to review your PR following this new design 🙏

@weeco
Copy link
Contributor

weeco commented May 8, 2023

@noctarius Just recently we released an official Redpanda module, maybe that helps you for integration tests. It starts faster than any Kafka container (generally more lightweight), it's Kafka API compatible and also comes with schema registry support.

@mdelapenya
Copy link
Collaborator

mdelapenya commented Jun 16, 2023

@noctarius did you take a look at #1034 (comment)?

In any case, please let me know if you want to keep this Kafka module, I could dedicate time with you to update the PR to use the new design for modules

@srenatus
Copy link
Contributor

Just a comment from the sidelines, I think it's worthwhile to keep this. If you're testing an application that should be compatible with Apache Kafka and Redpanda, I think it does make sense to test with them both.

@mdelapenya
Copy link
Collaborator

I think it does make sense to test with them both.

@srenatus cool then. Is anybody willing to contribute it? I'd start a new PR, or rewrite this one, using the new APIs for modules, just copying the functionality in this PR.

@noctarius
Copy link
Author

Hey folks! Sorry for the long abstinence. Happy to make a new version of this but not sure when I get to that. If anyone wants to chime in, feel free :)

@mdelapenya
Copy link
Collaborator

I have a working PR for this. Will submit and close this one.

Thanks for the initial work here @noctarius!! I will add you to #636 as contributor of the kafka module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants