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

Skip to content

Use Quarkus Platform BOM#21078

Closed
Pepo48 wants to merge 5 commits intokeycloak:mainfrom
Pepo48:platform-bom
Closed

Use Quarkus Platform BOM#21078
Pepo48 wants to merge 5 commits intokeycloak:mainfrom
Pepo48:platform-bom

Conversation

@Pepo48
Copy link
Contributor

@Pepo48 Pepo48 commented Jun 19, 2023

  • added Quarkus Platform BOM
  • added Quarkus Operator SDK BOM
  • removed WildFly dependencies from the Quarkus module
  • removed all the dependency overrides from the parent POM

Closes #20570
Closes #15870

Signed-off-by: Peter Zaoral [email protected]

I might've missed dependencies that can be removed as a part of this PR. Therefore, please, let me know if you find such during the review. Thanks!

operator/pom.xml Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

@Pepo48 Do we need this property here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mabartos you're right, we should not need it anymore. Addressed.
Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mabartos I actually found out that OLM CI workflow is failing due to this change (see the comparison between this and this). So far I haven't found the connection between the property existence and the operator deployment, but I haven't investigated it properly just yet.

Does it ring any bell right away? I plan to test it on a local cluster tomorrow.

Copy link
Contributor

Choose a reason for hiding this comment

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

It does ring a bell. We're overriding the version in the root POM to something that's incompatible with Quarkus. We should remove all the overrides we don't need, see my comment below.

Copy link
Contributor Author

@Pepo48 Pepo48 Jun 28, 2023

Choose a reason for hiding this comment

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

I resolved it for now. The question is though, what should we do in case that the provided version from the platform BOM is currently older than the one we currently use in the project?

Speaking about WF common, the difference is 1.6.0 compared to 1.5.4 (provided by the BOM). As it can be seen in my latest commit, I approached it by removing the dependency override from the parent POM and then I overrode the dependency version on the submodule level.

Is this the desired approach?

Copy link
Contributor

Choose a reason for hiding this comment

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

@Pepo48 Works for me but we'll need a blessing from the core team at minimum once this PR is finalized.

@Pepo48 Pepo48 force-pushed the platform-bom branch 2 times, most recently from 40ac490 to 56db0de Compare June 20, 2023 20:54
@vmuzikar vmuzikar requested review from ASzc and vmuzikar June 26, 2023 15:16
@vmuzikar vmuzikar linked an issue Jun 27, 2023 that may be closed by this pull request
Copy link
Contributor

@ASzc ASzc left a comment

Choose a reason for hiding this comment

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

Seems ok from a product perspective. The runtime/buildtime version property split has been kept, so that's good

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.

@Pepo48 Thanks for the PR.

Part of the effort around using Quarkus BOM is to stop specifying versions of the dependencies that are already present in the BOM. I think there are lots of them in the root POM. Do you plan to address it in this PR, or will it be a follow-up? Either way works for me. We need to be careful now about not doing anything too dangerous now, just days before release.

@Pepo48
Copy link
Contributor Author

Pepo48 commented Jun 28, 2023

@Pepo48 Thanks for the PR.

Part of the effort around using Quarkus BOM is to stop specifying versions of the dependencies that are already present in the BOM. I think there are lots of them in the root POM. Do you plan to address it in this PR, or will it be a follow-up? Either way works for me. We need to be careful now about not doing anything too dangerous now, just days before release.

I am working on it in a separate testing branch just for now, the intersection is quite big (at least based on my analysis from two days ago it's not just couple of dependencies). I'm testing it continuously, I didn't want to clutter this PR with unnecessary force pushes in order to re-run the CI every single time.

And yes, my original intention was to keep it separate just because of the size. But I can easily merge it, it doesn't matter to me much. I will finish the rest of the cleanup tomorrow.

@Pepo48
Copy link
Contributor Author

Pepo48 commented Jun 29, 2023

What was removed from the parent BOM:

aesh - bumped from 2.4 to 2.7

bc-fips
bctls-fips

commons-io
commons-lang3

hibernate-core
httpcore
httpmime

jackson-annotations
jackson-corex
jackson-databindx
jackson-dataformat-cbor
jackson-datatype-jdk8
jackson-jaxrs-base
jackson-jaxrs-json-provider
jackson-module-jaxb-annotations

jakarta.activation-api
jakarta.persistence-api
jakarta.servlet-api
jakarta.transaction-api
jakarta.ws.rs-api
jakarta.xml.bind-api

javaparser-core - bumped from 3.24.2 to 3.25.2
javax.annotation-api

jboss-logging-annotations
jboss-logging-processor
jboss-logging

jna - bumped from 4.5.1 to 5.8.0
microprofile-metrics-api - bumped from 3.0.1 to 4.0.1
microprofile-openapi-api
slf4j-api

What can be pottentially removed (and for now I left untouched):

bcpkix-jdk15on - bcpkix-jdk18on is available in the platform BOM
bcprov-jdk15on - bcprov-jdk18on is available in the platform BOM

guava - we currently use a newer version compared to the one available in the platform BOM - 31.1.1 32.0.0 compared to 32.0.1
infinispan - we currently use a newer version compared to the one available in the platform BOM - 14.0.9 compared to 14.0.10

h2- we use the same version as the BOM provides, but based on the h2.version, the jdbc driver version is determined too, for now I leave the h2 dependency untouched in order to prevent a version mismatch in the future. The same seems to apply to mysql-connector-java.

Things I would like to discuss before I address them:

  • should we explicitely exclude all the keycloak dependencies from the platform BOM or we don't care since everything is overriden anyway?
  • can dependencies with excluded transitive dependencies be removed as well? do we care about the exclusions on the parent POM level at this point (see e.g. liquibase-core or resteasy dependencies)
  • what about the dependencies that have a scope specified on the parent POM level? (see e.g protostream-processor)

Edit: I'm already aware about the test failures.

@Pepo48 Pepo48 force-pushed the platform-bom branch 2 times, most recently from 9a1accc to 7f4852f Compare June 30, 2023 09:47
@stianst stianst requested a review from miquelsi June 30, 2023 10:39
Copy link

@ghost ghost left a 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

@ghost
Copy link

ghost commented Jun 30, 2023

Unreported flaky test detected

If 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.model.session.SessionTimeoutsTest#testOfflineUserClientMaxLifespanSmallerThanSession

Keycloak CI - Store Model Tests

java.lang.AssertionError: expected null, but was:<org.keycloak.models.sessions.infinispan.AuthenticatedClientSessionAdapter@27ff47e8>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotNull(Assert.java:756)
	at org.junit.Assert.assertNull(Assert.java:738)
	at org.junit.Assert.assertNull(Assert.java:748)
...

Report flaky test

Pepo48 added 5 commits July 2, 2023 23:09
* added Quarkus Platform BOM
* added Quarkus Operator SDK BOM

Closes keycloak#20570

Signed-off-by: Peter Zaoral <[email protected]>
* removed WildFly dependencies from the Quarkus module

Signed-off-by: Peter Zaoral <[email protected]>
* overridden dependencies cleanup

Signed-off-by: Peter Zaoral <[email protected]>
* reverted some changes in order to stabilize the testsuite
* upgraded quarkus

Signed-off-by: Peter Zaoral <[email protected]>
* reverted Quarkus upgrade as it is going to be handled separately in keycloak#21352

Signed-off-by: Peter Zaoral <[email protected]>
@Pepo48
Copy link
Contributor Author

Pepo48 commented Jul 2, 2023

jFTR, #21352 will (most likely*) affect the dependency list above in a following way:

bctls-fips - bumped from 1.0.14.1 to 1.0.16
commons-io - bumped from 2.11.0 to 2.13
javaparser-core - bumped from 3.24.2 to 3.25.3

*I compared it with 3.2.0.CR1, because the final platform BOMs were not released just yet.

@vmuzikar
Copy link
Contributor

vmuzikar commented Jul 3, 2023

This is currently waiting for Quarkus Platform BOMs 3.2.0.Final to be released.

@vmuzikar
Copy link
Contributor

vmuzikar commented Jul 5, 2023

This was superseded by #21426 (@Pepo48 is on PTO)

@vmuzikar vmuzikar closed this Jul 5, 2023
@Pepo48 Pepo48 deleted the platform-bom branch August 1, 2023 21:52
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.

Use Quarkus Platform BOMs Cleanup unused WildFly dependencies in the distribution Use dist Quarkus version in the operator

4 participants