Support ignoring artigacts when running re-augmentation - #20976
Conversation
|
@pedroigor The issue is super valid. Code LGTM. However, there are still some insufficiencies as the tests failed. |
|
@mabartos Looks like we can make this much simpler. @aloubyansky is working on a change to Quarkus. Initial tests show that it is enough to solve our problem. The main change on our side would be to set |
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.ui.account2.LinkedAccountsTest#linkAccountTestKeycloak CI - Account Console IT (firefox) |
ghost
left a comment
There was a problem hiding this comment.
Unreported flaky test detected, please review
|
The fix from quarkusio/quarkus#34107 should help to remove the workarounds in hibernate (e.g.: duplicate of the Based on discussions with @aloubyansky, we should be able to get this change before 22. |
|
@pedroigor Is it still valid we want this change to get to 22? |
|
Just FYI, |
Would be good to have this change for 22 as long as it can be based on the Quarkus 3.2.0 changes so that the whole modules can be ignored upon build. Then this PR would be cleaner, without the need to override the |
|
If I understand correctly, this is then effectively waiting for Quarkus 3.2, correct? |
|
See my previous comment, it's already available. Not the platform but you are not using the platform BOM anyway. |
|
@aloubyansky Yeah, I meant waiting for us to upgrade to 3.2. ;) |
|
Since #21352 was merged, we can continue with this PR. |
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.forms.ResetPasswordTest#resetPasswordWrongSmtpKeycloak CI - Forms IT (firefox) org.keycloak.testsuite.model.session.OfflineSessionPersistenceTest#testPersistenceMultipleNodesClientSessionsAtRandomNodeKeycloak CI - Store Model Tests |
ghost
left a comment
There was a problem hiding this comment.
Unreported flaky test detected, please review
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.forms.ResetPasswordTest#resetPasswordWrongSmtpKeycloak CI - Forms IT (firefox) org.keycloak.testsuite.model.session.OfflineSessionPersistenceTest#testPersistenceMultipleNodesClientSessionsAtRandomNodeKeycloak CI - Store Model Tests |
ghost
left a comment
There was a problem hiding this comment.
Unreported flaky test detected, please review
ghost
left a comment
There was a problem hiding this comment.
Unreported flaky test detected, please review
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.forms.ResetPasswordTest#resetPasswordWrongSmtpKeycloak CI - Forms IT (firefox) org.keycloak.testsuite.model.session.OfflineSessionPersistenceTest#testPersistenceMultipleNodesClientSessionsAtRandomNodeKeycloak CI - Store Model Tests |
mabartos
left a comment
There was a problem hiding this comment.
@pedroigor Code looks good to me, nice job! I've put only one comment below.
As the IGNORE_ARTIFACTS option is hidden, does it mean it's intended to use only internally, right? As users cannot use the property class-loader-ignore-artifacts to ignore other artifacts, right?
If that's the case, it works as expected as the user is not capable to ignore other artifacts via the property.
However, we could maybe consider providing such a capability as users could also ignore some artifacts for their deployments.
@pedroigor WDYT?
|
@mabartos Regarding making it a user-facing option, I would keep it hidden for now and only available internally. Not sure about the use cases we are going to address with it. |
Agree to have it hidden for now. |
| if (ignoredArtifacts != null && StringUtil.isNotBlank(ignoredArtifacts.getValue())) { | ||
| // ignored artifacts must be set prior to starting re-augmentation | ||
| System.setProperty("quarkus.class-loading.removed-artifacts", ignoredArtifacts.getValue()); | ||
| } |
There was a problem hiding this comment.
Just out of curiosity, why do we need this if we already have mapping here:
Can't we remove either of them?
There was a problem hiding this comment.
@vmuzikar To leverage the related fix from Quarkus, we need to make sure the build class loader is built taking this property into account so that the artifacts are ignored accordingly.
By keeping only within our mapping layer, it is too late because the build class loader was already built.
We could potentially keep everything within the Build command but I did not test it. Also, I think keeping the resolution within our configuration is more natural and aligned with what we are doing for others.
Closes #20974