-
Notifications
You must be signed in to change notification settings - Fork 3k
Catch Docker check exceptions in lightweight OIDC devservice #47346
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
Catch Docker check exceptions in lightweight OIDC devservice #47346
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about the failure, but I have also mentioned that dockerStatusBuildItem.isContainerRuntimeAvailable()
results into exception logged when I was testing DEV mode. +1 for not failing
Should we have a dependency between the two instead? And have a build item that states if the Keycloak Dev Services will be started or not? |
yep, but as I tried to explain (I think last week on Slack? not sure when) right now when OIDC Dev Svc is tightly coupled to OIDC while Keycloak Dev SVc has very different logic for other extensions and maybe, we should share a great deal of that logic as well (e.g. is server url set, is client server url set etc. etc.). I think we shouldn't hurry with introducing SPI just because of this, I'd like to enhance the startup logic, but I don't have space now |
but that would avoid the Docker check in this extension, is that what you meant? that is clever, I didn't realize. we can add spi |
OIDC dev service is likely going to remain the only dev service that may have to be aware that Keycloak devservice may have to be started instead, is SPI really needed ? |
So not saying we should do what I said but I'm a bit unhappy about what's going on: it's a bit annoying that we end up with logging about Docker not being available while it's a perfectly acceptable setup in this case. |
As far as I recall, we only added this Docker check to avoid asking users to set |
OK, I see what you mean |
That said, may be can shoud log: |
@gsmet added some line like that lately |
I see it, that message is useful, but that one is about |
yeah, that makes definitely sense if we can't avoid the warn logging altogether |
acec6cd
to
821f6f4
Compare
@michalvavrik @gsmet I've updated the log messages related to the docker check, have a look please |
This comment has been minimized.
This comment has been minimized.
The failure looks unrelated and to do with the legacy Keycloak image pull |
821f6f4
to
ee0d217
Compare
Just rerun it on my laptop, this test passes on this branch. Rebased and force-pushed. |
Status for workflow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this but as discussed with @michalvavrik I would prefer if we had a proper integration between the two.
I've noticed
integration-tests/oidc-wiremock-logout
is failing periodically on Windows, I looked at the stacktrace,so I hope just wrapping the check in a catch block will help, the lightweight OIDC devservice only checks if the Docker is available to figure out if Keycloak dev service may have to start instead, it does not start any container itself