Create Java21 base image and switch our project to Java21 by default (#23)
Wojciech Kapcia (Tigase) opened 1 week ago

Java21 was release in September 2023 (almost 2 years ago) so it's "high time" and we should update to 21 (LTS) for tigase-server-8.5.0 to make the update to next LTS easier with tigase-server-9.0

Referenced from commit 1 week ago
Referenced from commit 1 week ago
Wojciech Kapcia (Tigase) changed state to 'In QA' 1 week ago
Previous Value Current Value
Open
In QA
Wojciech Kapcia (Tigase) commented 1 week ago
  • add option to specify JDK version via env variable
  • bump default JDK version to 21
  • add alpine flavoured base image as well as tigase-server image (alpine profile)
  • update readme
  • bump groovy version to 3.0.24 (supports up to JDK 24)

Alpine image is about 40% smaller: Captura de pantalla 2025-04-09 a las 14.24.14.png

And as a results Tigase image is about 25% smaller: Captura de pantalla 2025-04-09 a las 14.25.04.png

One annoying thing I found out was that, for some reason, we depend on java.desktop module, which adds 15M to our images. Upon closer investigation turned out it's required by http-api, or rather by groovy that it uses:

wojtek@atlantiscity.local ~/dev/tigase/tigase-server-distribution $ jdeps -v --multi-release 21 target/_dist-container/tigase-server-enterprise/tigase-server-enterprise/jars/tigase*.jar | grep desktop
tigase-http-api.jar -> java.desktop
   tigase.http.coders.JsonCoder                       -> java.beans.Transient                               java.desktop
   tigase.http.coders.XmlCoder                        -> java.beans.Transient                               java.desktop
   tigase.http.modules.rest.HandlersLoader            -> java.beans.Transient                               java.desktop
   tigase.http.modules.rest.OldGroovyRequestHandler   -> java.beans.Transient                               java.desktop
   tigase.http.modules.rest.OldGroovyRequestHandler$1 -> java.beans.Transient                               java.desktop
   tigase.http.modules.rest.OldGroovyResultEncoder    -> java.beans.Transient                               java.desktop
   tigase.http.rest.Handler                           -> java.beans.Transient                               java.desktop
   tigase.http.rest.Handler$Result                    -> java.beans.Transient                               java.desktop

I guess we can't do much about it before we get rid of Groovy completely in tigase-server-9.0… ( @andrzej.wojcik ?)

Andrzej Wójcik (Tigase) commented 1 week ago

Yes, it looks like it is coming from Groovy as all listed classes are groovy based or depend somehow on Groovy. I suppose we should just get rid of Groovy to fix this issue.

Wojciech Kapcia (Tigase) commented 1 week ago

Yes, it looks like it is coming from Groovy as all listed classes are groovy based or depend somehow on Groovy. I suppose we should just get rid of Groovy to fix this issue.

No, I mean it's definitely groovy:

Captura de pantalla 2025-04-09 a las 16.57.45.png

What I meant was - we need to completely remove groovy support (and support for groovy handlers) thus, version 9.0…

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Version
none
Sprints
n/a
Customer
n/a
Iterations
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/tigase-xmpp-server-docker#23
Please wait...
Page is in error, reload to recover