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

Implement a label based discovery for Kafka Dev Service #17837

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

cescoffier
Copy link
Member

@cescoffier cescoffier commented Jun 10, 2021

Instead to have to configure the kafka.bootstrap.url, it looks for containers having a specific label and computes the bootstrap server.
Discovery can be disabled in the configuration, and it is only used in dev mode (disabled for test).

@stuartwdouglas we discussed this briefly on the mailing list. It's a draft but works.

TODO:

  • update the documentation
  • if we decide to go this way, move the label name to a shared class (so every dev service can use it)
  • extend configuration to allows configuring the label or value

@sberyozkin
Copy link
Member

@cescoffier This looks great and will solve the problem I'm seeing with Dev Services for Keycloak - where a 2nd container is starting if I press Continuous Testing r.

@Ladicek
Copy link
Contributor

Ladicek commented Jun 10, 2021

I went through several dev services implementations in the last few days and I think we really need a common class that helps implementing a dev service based on a single container. They all have a lot of things in common, but each also has some idiosyncratic differences.

If we had that, it could also handle this label-based sharing.

@cescoffier
Copy link
Member Author

@stuartwdouglas What do you want to do about this one? Should be move forward?
(I will do the rebase later)

@cescoffier cescoffier added the triage/needs-rebase This PR needs to be rebased first because it has merge conflicts label Jun 16, 2021
@stuartwdouglas
Copy link
Member

I think it looks good.

@cescoffier
Copy link
Member Author

Ok, I will rebase , polish a bit and ask for reviews.

@cescoffier cescoffier force-pushed the label-based-service-discovery branch 2 times, most recently from 4e6c482 to de3a86f Compare June 16, 2021 13:02
@cescoffier cescoffier removed the triage/needs-rebase This PR needs to be rebased first because it has merge conflicts label Jun 16, 2021
@cescoffier cescoffier marked this pull request as ready for review June 16, 2021 13:50
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 16, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building de3a86f

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 16 Build ⚠️ Check → Logs Raw logs

Copy link
Member

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some minor comments.

@cescoffier cescoffier force-pushed the label-based-service-discovery branch from de3a86f to 9b14b91 Compare June 17, 2021 07:28
@cescoffier
Copy link
Member Author

@stuartwdouglas I updated the code to use a specific label for Kafka.

@Ladicek
Copy link
Contributor

Ladicek commented Jun 17, 2021

Looks good, all my comments are about documentation (and one is about logging).

@cescoffier cescoffier force-pushed the label-based-service-discovery branch from d06e724 to 55b7a89 Compare June 17, 2021 09:49
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 17, 2021

This workflow status is outdated as a new workflow run has been triggered.

🚫 This workflow run has been cancelled.

Failing Jobs - Building d06e724

⚠️ Artifacts of the workflow run were not available thus the report misses some details.

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Build ⚠️ Check → Logs Raw logs

@quarkus-bot
Copy link

quarkus-bot bot commented Jun 17, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 55b7a89

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Build ⚠️ Check → Logs Raw logs

Instead to have to configure the kafka.bootstrap.url, it looks for containers having a specific label and compute the bootstrap server.
Discovery can be disabled in the configuration, and it is only used in dev mode (disabled for test).
@cescoffier cescoffier force-pushed the label-based-service-discovery branch from 55b7a89 to b601886 Compare June 17, 2021 10:17
@Ladicek
Copy link
Contributor

Ladicek commented Jun 17, 2021

I know I'm a pain, but looks good now! :-)

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

Successfully merging this pull request may close these issues.

None yet

4 participants