Skip to content
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

Keycloak 25 compatibility #204

Merged

Conversation

jannickherrmann
Copy link
Contributor

Motivation

I want to use the metrics spi with the newest keycloak version.

Releated issue: #199

What

Migrating to compatible RESTEasy Reactive dependencies.

Why

The current implementation is incompatible with Keycloak 25 due to the complete transition to RESTEasy Reactive. See issue: keycloak/keycloak#29223.

How

Both the Maven pom.xml and the build.gradle files have been updated to reflect the new dependencies. Additionally, support for WildFly JBoss has been removed because the code could not be easily migrated to the reactive dependencies. Moreover, I do not see a necessity for maintaining WildFly support: https://www.keycloak.org/migration/migrating-to-quarkus.

  • changed dependency to io.quarkus.resteasy.reactive:resteasy-reactive
  • updated to quarkus-resteasy version to 3.8.5
  • removed filter for deprecated and incompatible Wildfly / JBossEAP

Verification Steps

  1. run mvn compile or ./gradlew build to verify

Checklist:

  • Code has been tested locally by PR requester
  • Changes have been successfully verified by another team member

Progress

  • Finished task

Additional Notes

+ changed to io.quarkus.resteasy.reactive:resteasy-reactive
+ changed quarkus-resteasy.version to 3.8.5
- removed filter for deprecated and incompatible Wildfly / JBossEAP
@nicolabeghin
Copy link

+1 thanks @jannickherrmann !

@jabbrwcky
Copy link

👍
Note: When building locally I also had to update gradle to 8.5, because Keycloak 25.x switches to OpenJDK 21 LTS which is not supported by gradle 7.2

Keycloak will eventually drop support for JDK <21 https://www.keycloak.org/docs/latest/release_notes/#java-17-support-is-deprecated

@jannickherrmann
Copy link
Contributor Author

Yes, I read that too, but since it is currently "only" deprecated and has not yet been removed, I haven't touched it yet. It's my first pull request in this repository, so I didn't want to make too big a change straight away.
@jabbrwcky Maybe I'll update the PR later and include the change, thanks for your feedback.

@alexanderwolz
Copy link

👍

I can also confirm that this snapshot works with my Keycloak 25.0 setup.
Thanks a lot @jannickherrmann

@nicolabeghin
Copy link

nicolabeghin commented Jun 27, 2024

If useful, here's the JAR built from @jannickherrmann's repository branch keycloak-25-compatibility:

keycloak-metrics-spi-5.0.1-SNAPSHOT.jar.zip

(had to stupidly ZIP-it otherwise attachment not allowed in Github comment)

git clone git@github.com:jannickherrmann/keycloak-metrics-spi.git
git checkout feature/keycloak-25-compatibility
docker run --rm -v $(pwd):/opt/keycloak-metrics-spi -w /opt/keycloak-metrics-spi maven:3-eclipse-temurin-21-alpine bash -c "mvn clean package"
zip keycloak-metrics-spi-5.0.1-SNAPSHOT.jar.zip target/keycloak-metrics-spi-5.0.1-SNAPSHOT.jar

@estin68
Copy link

estin68 commented Jun 28, 2024

If useful, here's the JAR built from @jannickherrmann's repository branch keycloak-25-compatibility:

keycloak-metrics-spi-5.0.1-SNAPSHOT.jar.zip

(had to stupidly ZIP-it otherwise attachment not allowed in Github comment)

git clone git@github.com:jannickherrmann/keycloak-metrics-spi.git
git checkout feature/keycloak-25-compatibility
docker run --rm -v $(pwd):/opt/keycloak-metrics-spi -w /opt/keycloak-metrics-spi maven:3-eclipse-temurin-21-alpine bash -c "mvn clean package"
zip keycloak-metrics-spi-5.0.1-SNAPSHOT.jar.zip target/keycloak-metrics-spi-5.0.1-SNAPSHOT.jar

Thanks @nicolabeghin for the downloadable link and docker command.

@dominik0711
Copy link

👀

@erfantkerfan
Copy link

Is there something holding this from being mereged?
@pb82

@pb82
Copy link
Contributor

pb82 commented Jul 8, 2024

thanks @jannickherrmann ! I suppose this will no longer work on older versions on KeyCloak?

Sorry for the delay on my end.

@pb82 pb82 merged commit ac6ec32 into aerogear:master Jul 8, 2024
@jannickherrmann
Copy link
Contributor Author

@pb82 I haven't actually checked, but the changeover was carried out over several major versions of Keycloak, so it should also be downward compatible or compatible with certain versions. Already in Keycloak 23 the resteasy-reactive were used, only the resteasy-core was not completely removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants