-
Notifications
You must be signed in to change notification settings - Fork 7.4k
fix: makes the db setting require an explicit setting in prod #33760
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
Conversation
e22a572
to
0297f84
Compare
2dc7a07
to
f9f28fb
Compare
@vmuzikar @pedroigor @mabartos @Pepo48 just wanted to get some opinions on how to proceed with this pr as there are quite a few things going on there. Let me know what you want separated out:
I would also like to move more of the testing into unit tests, but I want to pick up the changes from #33648 merged first. |
ff98f5d
to
ae048a8
Compare
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.
Thinking about this further, I'm afraid we can't make --db
required in prod mode. Even though H2 is considered a dev only DB, it's still a breaking change and as such would need to wait for 27.
WDYT @keycloak/cloud-native @stianst?
I would not view it as breaking because it's already documented to not use dev-file in production - and they would have a straight-forward workaround of putting db=dev-file in their keycloak.conf. I'll clean up this pr now that a lot of it has been merged. |
closes: keycloak#23805 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Switching to a new pr with a deprecation instead: #35674 |
Also various cleanups related to the configuration - there is some tech debt, and a few things that are probably wrong. Some of this could be separated from the pr, but we do need to change how we detect auto-builds are needed to understand the absense of the db option. See also #33902
I had initially tried to go the direction of mapping the the database from the profile property - but that revealed some additional compleity that is needed to handle that case (so that the other values mapped from db could work). So instead this uses a delayed default value, which looks at the profile.
These changes also bring up what is dev vs prod means with the non-server commands. As it stands the changes will force users to specify --db on import, export, etc. just like start if --optimized is not specified. The alternative to this behavior is to default to the persisted db instead - but only if what's persisted is in the prod profile.
WDYT? @mabartos @vmuzikar @pedroigor
closes: #23805