-
Notifications
You must be signed in to change notification settings - Fork 7.4k
test: Provide test cases for datasources ENV vars handling #40760
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
fe19581
to
8ffddde
Compare
"quarkus.datasource.\"my-store\".db-kind", "mariadb", | ||
"quarkus.datasource.\"my.store\".db-kind", "mariadb" |
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.
Even though we're able to obtain the configuration for both variants (my-store
and my.store
), the named datasource in Quarkus is my.store
. See https://github.com/keycloak/keycloak/pull/40760/files#diff-161196ef0d1fee87940b57c35aa7d52ccc6da78c93eed92064e51483e047e101R36
It would be probably better to have the -
(minus) char the default for datasources, but probably not a big deal when we document it.
cc: @shawkins
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.
Even though we're able to obtain the configuration for both variants (my-store and my.store)
That is a side effect of the quarkus env config source. Anything that could map to the env form can be used. Only the my.store form is the canonical name that is advertised to quarkus (my!store). It would be fine to remove the assertions looking for the my-store form.
It would be probably better to have the - (minus) char the default for datasources
Yes, it would be best to do that for everything that is not logging. It doesn't make sense to default to the quarkus convention when we use '-'. I was going to add this for the spi work, but that didn't move forward, so it can be done here if you want.
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.
Yes, it would be best to do that for everything that is not logging. It doesn't make sense to default to the quarkus convention when we use '-'. I was going to add this for the spi work, but that didn't move forward, so it can be done here if you want.
@shawkins Agree. So, could you please provide such changes?
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.
it would be best to do that for everything that is not logging. It doesn't make sense to default to the quarkus convention when we use '-'
+1
Though, it would be considered a breaking change. We're already releasing the initial additional datasources support in 26.3
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.
Though, it would be considered a breaking change. We're already releasing the initial additional datasources support in 26.3
@vmuzikar Depends on how you look at it. Understand that we already have these options for it, but we don't state anywhere that it's supported, and we don't even have the documentation for it yet. So maybe it should not be a big deal.
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.
@mabartos Good point that there's no docs. Though it's included in --help
and NOT marked as a preview or something. We should've probably done that, I didn't realize it. :/
Signed-off-by: Martin Bartoš <mabartos@redhat.com>
8ffddde
to
3fd659a
Compare
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.cluster.RealmInvalidationClusterTest#crudWithFailoverKeycloak CI - Store IT (postgres)
|
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.
Unreported flaky test detected, please review
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'd still proceed with the PR as is. We should address the .
vs -
in a separate PR.
@vmuzikar Agree. |
…40760) Signed-off-by: Martin Bartoš <mabartos@redhat.com>
…40760) Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Related-to: #40387
We should provide some simple test cases for ENV var handling for additional datasources, as we're lacking them.
@shawkins Could you please check it? Thanks