-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Incorrect Devservices config generated for Keycloak with Testcontainers Cloud #27763
Comments
I'm happy to help out and dig further into this btw. Where would I find the parts where the config is generated for the devservices? And does this differ for Keycloak? |
@wjglerum the culprit will probably be in KeycloakDevServicesProcessor. It's where the config is adjusted. |
I believe this is the issue: Line 403 in 83e7991
Line 423 in 83e7991
It assumes that the port will be the same on More on this: |
@geoand would you have more insights for this and how to proceed? As I see that you worked on those bits. |
I'll try and have a look tomorrow and let you know, but I can't make any promises |
I just confirmed that this is indeed the problematic bit by making sure it skips that bit of the code by adjusting the code locally and building Quarkus locally. Now it does inject the correct port mapping in the keycloak url while using Testcontainers Cloud.
|
Thanks! I'll have another look tomorrow too. |
So you seem to have something working, no? |
I am a little bit out of the loop, but can't Quarkus make use of this existing Keycloak module? It is not part of the bundled Testcontianers modules at this point, but @dasniko is an active member of the Testcontainers community, and his implementation does not use fixed ports. |
That's a fair question. I personally don't know, but it's definitely worth exploring |
@kiview It may be an interesting enhancement idea as its API looks nice but it is hard to know it will work without the fixes done by Georgios, both the one built here and the one created by @dasniko are TestContainer instances so perhaps the simplest option is to address this particular issue here. The local implementation makes it a bit more flexible - ex, |
fixes: quarkusio#27763 (cherry picked from commit 04582da)
Describe the bug
When using Devservices for Keycloak with Testcontainers Cloud an incorrect config is generated. The detected port mapping is correct, however the injected urls contain the wrong port.
The port
65299
is detected in the port mappings, however the config gets port65224
injected and nothing is listening on this port.This does work correctly for data services, like PostgreSQL and Kafka, see below.
Expected behavior
It does work correctly when using Docker Desktop for Mac instead.
Output of
$ sudo lsof -i -n -P | grep TCP
Actual behavior
The app fails with the following exception:
Output of
$ sudo lsof -i -n -P | grep TCP
How to Reproduce?
Use Testcontainers Cloud for Mac instead of Docker Desktop for Mac. And start a project from scratch with the OIDC extension.
Output of
uname -a
orver
Output of
java -version
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.12.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Additional information
Testcontainers Cloud version 1.3.3
You can probably ask access to their private beta if needed.
The text was updated successfully, but these errors were encountered: