Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ahus1
Copy link
Contributor

@ahus1 ahus1 commented Jun 6, 2024

Avoids problems if the hostname can't be resolved by InetAddress.getLocalHost()

I assume the AUTO_MODE set up here is still useful if multiple instances of Keycloak running from the same folder make sense. If it doesn't make sense, let me know.

Closes #26042

@ahus1 ahus1 self-assigned this Jun 6, 2024
@ahus1 ahus1 mentioned this pull request Jun 6, 2024
1 task
@ahus1
Copy link
Contributor Author

ahus1 commented Jun 6, 2024

@pedroigor / @Pepo48 / @vmuzikar - I'd like to get your feedback on this, and if AUTO_SERVER mode is useful for Keycloak (either when developing, or in tests). If not, we could simplify the setup.

See the H2 for more docs on this: https://www.h2database.com/html/features.html#auto_mixed_mode

@vmuzikar
Copy link
Contributor

vmuzikar commented Jun 6, 2024

@ahus1 Thank you for the PR.

I'm not aware of any reason to keep AUTO_SERVER=TRUE, AFAIK it doesn't work for dev-mem in any case, no real reason to keep it for dev-file from my perspective.

Without it, we don't need to set h2.bindAddress?

@ahus1
Copy link
Contributor Author

ahus1 commented Jun 7, 2024

Without it [AUTO_SERVER], we don't need to set h2.bindAddress?

Yes, this is my understanding. Do we use in the test suite a setup with dev-file where we start for example cluster of two nodes, and those access the same database?

Also asking @pedroigor, @sguilhen and @vramik. Thanks!

This avoids problems if the hostname can't be resolved by InetAddress.getLocalHost()

Closes keycloak#26042

Signed-off-by: Alexander Schwartz <[email protected]>
@ahus1 ahus1 force-pushed the is-26042-avoid-auto-server-true branch from 09ec315 to 23278a1 Compare June 11, 2024 08:59
vmuzikar
vmuzikar previously approved these changes Jun 11, 2024
Closes keycloak#28311

Signed-off-by: Alexander Schwartz <[email protected]>
@ahus1
Copy link
Contributor Author

ahus1 commented Jun 11, 2024

@vmuzikar - with the removal of AUTO_SERVER, it is now no longer possible to run the cluster tests with H2, and instead you'll need to use a real database.

WDYT? If you think running it with H2 makes things simpler, I'll need to dig deeper into this to figure out how to pass the DB URL options to Quarkus (the CLI allows it, but IMHO the build isn't equipped for that).

@vmuzikar
Copy link
Contributor

@ahus1 IMHO that's something for the Core Teams to decide. It is true that is is a bit inconvenient to use a real DB. On the other hand, we should not be including stuff in the dist that is required for tests only...

Copy link
Contributor

@pedroigor pedroigor left a comment

Choose a reason for hiding this comment

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

@ahus1 I would only keep AUTO_SERVER=true because it is useful during dev when running multiple instances. I think because of cluster tests and local dev we have this set.

I remember a long time ago solving problems with that setting, probably when enabling cluster tests to quarkus. But you are solving it differently (and better) now.

But if @mposolda thinks otherwise, I don't mind removing it.

@ahus1 ahus1 marked this pull request as ready for review June 14, 2024 19:53
@ahus1 ahus1 requested review from a team as code owners June 14, 2024 19:53
@ahus1
Copy link
Contributor Author

ahus1 commented Jun 14, 2024

@vmuzikar - there haven't been objections by @mposolda, so I assume this can now be merged. I assume this should be backported to KC25. Should it also be backported to KC24? I'd assume yes, please advise if you think differently.

Copy link
Contributor

@vmuzikar vmuzikar left a comment

Choose a reason for hiding this comment

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

@ahus1 LGTM, thank you.

@miquelsi Do we run cluster tests internally as well? If so, they'll need to be adjusted in the same manner as in this PR.

@miquelsi
Copy link
Contributor

@ahus1 LGTM, thank you.

@miquelsi Do we run cluster tests internally as well? If so, they'll need to be adjusted in the same manner as in this PR.

No, we don't run cluster tests internally.

@ahus1 ahus1 merged commit 9ce47fc into keycloak:main Jun 19, 2024
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.

Issue when start-dev in 23.0.1

4 participants