Ignore JDBC Drivers artifacts - #22443
Conversation
72d4e17 to
f22ac9f
Compare
Unreported flaky test detectedIf the below 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.admin.concurrency.ConcurrentLoginTest#concurrentLoginSingleUserKeycloak CI - New Store IT (hot-rod) |
ghost
left a comment
There was a problem hiding this comment.
Unreported flaky test detected, please review
7ded5c3 to
eabf44d
Compare
Unreported flaky test detectedIf the below 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.x509.X509BrowserCRLTest#loginSuccessWithCRLSignedWithIntermediateCA3FromTruststoreKeycloak CI - FIPS IT (strict) org.keycloak.testsuite.x509.X509BrowserCRLTest#loginFailedWithIntermediateRevocationListFromFileKeycloak CI - FIPS IT (strict) org.keycloak.testsuite.x509.X509BrowserCRLTest#loginFailedWithIntermediateRevocationListFromHttpKeycloak CI - FIPS IT (strict) org.keycloak.testsuite.x509.X509BrowserCRLTest#loginFailedWithInvalidSignatureCRLKeycloak CI - FIPS IT (strict) |
ghost
left a comment
There was a problem hiding this comment.
Unreported flaky test detected, please review
ahus1
left a comment
There was a problem hiding this comment.
Thank you for this change. Will this prevent some of the warning messages we've seen earlier when a DB driver is removed? What are the performance benefits of this change - there is always the cost to make it more difficult to maintain.
I could see the need for some users to change from an included DB driver to a self-provided DB driver. Would this change enable this, or is it unrelated?
While the list of drivers looks correct to me, I leave the final call if the added complexity is smaller than the benefits that we would expect here.
For anyone visiting this in the future, I'd like to see a at least a very short summary of the expected benefits.
|
@ahus1 Thanks for your points. There are performance benefits, indeed. I'll describe it more tomorrow. |
|
This change brings quite a lot of benefits to us. First of all, the execution of build, static-init, and runtime build steps is done only for the specified DB. By this change, Quarkus is not aware of any other JDBC extension except the one for the chosen DB, so there's no need to execute these build steps, which could produce additional beans, service providers, configuration handling, agroal connection settings, and much more. To summarize, we can prevent the execution of unused build steps, create additional resources, reduce memory allocations, GC executions, C1/C2 executions... I've made a brief analysis of the performance (few executions followed by a comparison): Startup
Heap
GC - GC executions reduced about ~20%.
Yes, and much more as the build steps for different JDBC extensions are not executed at all.
I think it's unrelated to this PR as the logic behind using the custom JDBC drivers has not changed. EDIT: |
|
I abstain from voting here, I leave it to the CND team to decide. |
|
I just wanted to add my thought to the certain performance/maintainability controversion. What's the worst that can happen? If some of the transitive dependencies (the JDBC driver JAR) change in the Quarkus extension and it's not reflected here, it'll just not be ignored and will be processed. So, we would end up in the same state as we're now in Keycloak main ;) But there's a tiny probability it'll happen, as it'd be reflected in the Quarkus release notes, and it will not be changed so often anyway(if almost ever). It just seems to me weird that if a user wants to use Postgres DB, the stuff related to Oracle, MS-SQL, MariaDB,... is processed. We should avoid such situations. I'm a little bit surprised it unleashed such a broad conversation about it and took a considerable amount of effort to promote it :) @vmuzikar @pedroigor I'd be glad for your input. |
5130d1b to
45c2ced
Compare
Closes keycloak#22442 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Unreported flaky test detectedIf the below 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.account.AccountRestServiceTest#updateConsentForClientWithPutKeycloak CI - Java Distribution IT (windows-latest - temurin - 19) org.keycloak.testsuite.account.AccountRestServiceTest#createConsentForClientWithPutKeycloak CI - Java Distribution IT (windows-latest - temurin - 19) org.keycloak.testsuite.account.AccountRestServiceTest#createConsentForClientKeycloak CI - Java Distribution IT (windows-latest - temurin - 19) |
ghost
left a comment
There was a problem hiding this comment.
Unreported flaky test detected, please review
vmuzikar
left a comment
There was a problem hiding this comment.
@mabartos Thanks for the elaborate analysis.
While the perf difference not that impressive from my perspective, I see relatively low risk in introducing this optimization with acceptable maintenance costs of it.
Of course it's not ideal as the final goal here is to have some more generic capability to exclude unwanted/unused bits from runtime and even the distribution based on selected features. But that's certnainly not something we can prioritize now.
I'm going to approve but I'd like to get a green tick from @pedroigor as well was involved in the discussion too, IIRC.
This reverts commit d0bfbde. Signed-off-by: Václav Muzikář <vmuzikar@redhat.com>
Closes keycloak#22442 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Closes keycloak#22442 Signed-off-by: Martin Bartoš <mabartos@redhat.com> Signed-off-by: ShefeeqPM <86718986+ShefeeqPM@users.noreply.github.com>
This reverts commit d0bfbde. Signed-off-by: Václav Muzikář <vmuzikar@redhat.com> Signed-off-by: ShefeeqPM <86718986+ShefeeqPM@users.noreply.github.com>
* Ignore JDBC Drivers artifacts (keycloak#22443) Closes keycloak#22442 Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Fix obtaining removed artifacts from the configuration Signed-off-by: Martin Bartoš <mabartos@redhat.com> --------- Signed-off-by: Martin Bartoš <mabartos@redhat.com> Signed-off-by: ShefeeqPM <86718986+ShefeeqPM@users.noreply.github.com>
Closes #22442