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

JDK20 image missing #247

Closed
jurriaan opened this issue May 8, 2023 · 21 comments
Closed

JDK20 image missing #247

jurriaan opened this issue May 8, 2023 · 21 comments

Comments

@jurriaan
Copy link
Contributor

jurriaan commented May 8, 2023

The jdk20 images are missing on dockerhub, can they be released?

@keeganwitt
Copy link
Owner

keeganwitt commented May 8, 2023

As I noted in the PR that added the images (#245), the latest (8.1.1) release notes say

Gradle now supports using Java 20 for compiling, testing, and starting other Java programs. This can be accomplished by configuring your build or task to use a Java 20 toolchain.

You cannot currently run Gradle on Java 20 because Kotlin lacks support for JDK 20. However, you can expect support for running Gradle with Java 20 in a future version.

They also note this in their compatibility guide. This is why I have not yet published the Java 20 images to Docker Hub.

So In order to compile targeting Java 20, you'd need a Docker image with both Java 8, 11, or 17 and Java 20. This Docker image hasn't ever published images with multiple versions of Java on it. My hope was that full Java 20 support was coming soon, but it sounds like it might not be until 8.2 (July). See the issue here. You can also follow the Kotlin issue issue. I'm not sure which Scala issue(s) are relevant yet. I'ts possibly scala/scala/pull/10359 and scala/scala/pull/10184. They mention Java 20 support in their 2.13.11 release planning here.

@jurriaan
Copy link
Contributor Author

jurriaan commented May 8, 2023

Ah, sorry! Thanks for the info!

@jurriaan jurriaan closed this as completed May 8, 2023
@keeganwitt
Copy link
Owner

No problem! If Java 20 is something folks need, we can open another ticket to figure out how to do a dual or multi JDK image. Offhand, it seems like I'd have to copy (with some small edits) what the Temurin folks have.

@keeganwitt
Copy link
Owner

I think a 17-based image that has 20 also installed for use with a toolchain actually isn't as complicated to do as I originally thought (once the idea of a multi-stage image occurred to me). #248 If there's interest, let me know.

@JohannesLichtenberger
Copy link

@keeganwitt the jdk20 images are still missing and my CI for SirixDB currently fails, because I forgot to check if the images are there before merging my PR (and missed to update the Dockerfile of course). There were however jdk19 images... so I'd imagine supporting jdk20 should be a no brainer? :-)

@keeganwitt
Copy link
Owner

They're not published into Docker Hub yet because

I was trying to avoid merging #248 since it's another image to maintain and Gradle 8.3 wasn't far off. But if there are folks that really need it, I can. Just let me know.

To clarify what's needed for Java 20 with Gradle 8.1/8.2: You have to start Gradle with Java 11/17, then use Java 20 in a toolchain to target Java 20 bytecode. That's what the image in #248 was about: an image that ships multiple JDKs.

@JohannesLichtenberger
Copy link

Hmm, wasn't aware of this, but the gradle wrapper with Gradle 8.2.1 seems to work with Java 20... but have only tried with IntelliJ so far and executing the unit tests / integration tests.

@JohannesLichtenberger
Copy link

This is the Dockerfile: https://github.com/sirixdb/sirix/blob/master/Dockerfile

@JohannesLichtenberger
Copy link

I'd also go with a GraalVM based image as in tests the new version for Java 20 was really way faster in one test with a huge import file (meaning 60s instead of roughly 100s to import a close to 4Gb JSON file). Still, with async flushes to disk in the future it should be faster, but at least we managed to import also with only 8Gb RAM on one machine, whereas with MongoDB it doesn't seem possible to import at all.

@keeganwitt
Copy link
Owner

keeganwitt commented Aug 16, 2023

Hmm, wasn't aware of this, but the gradle wrapper with Gradle 8.2.1 seems to work with Java 20... but have only tried with IntelliJ so far and executing the unit tests / integration tests.

I've heard similar anecdotes, though I can't speak to it from personal experience. As an official image, my policy has to follow the official recommendations/statements from the Gradle team themselves. If I were to publish the Java 20 image that I have in this repo, it'd have to be to an unofficial location in Docker Hub. They exist here mostly so I'm ready to rock and roll when 8.3 gets released.

This is the Dockerfile: https://github.com/sirixdb/sirix/blob/master/Dockerfile

Also keep in mind, Java 19 is EOL, which is why this project is no longer publishing updates to those images.

@keeganwitt
Copy link
Owner

keeganwitt commented Aug 16, 2023

I'd also go with a GraalVM based image as in tests the new version for Java 20 was really way faster in one test with a huge import file (meaning 60s instead of roughly 100s to import a close to 4Gb JSON file). Still, with async flushes to disk in the future it should be faster, but at least we managed to import also with only 8Gb RAM on one machine, whereas with MongoDB it doesn't seem possible to import at all.

Once docker-library/official-images#15214 is merged, GraalVM Gradle images should be in a usable state.

@JohannesLichtenberger
Copy link

Is it GraalVM for Java 20 and Gradle 8.2.1? The GraalVM images as of now don't seem to have a Java version in the tag name IIRC. All in all it seems I have to wait for Gradle 8.3 (luckily it's a spare time project since the last 10 years ;-))

@keeganwitt
Copy link
Owner

keeganwitt commented Aug 16, 2023

Is it GraalVM for Java 20 and Gradle 8.2.1? The GraalVM images as of now don't seem to have a Java version in the tag name IIRC. All in all it seems I have to wait for Gradle 8.3 (luckily it's a spare time project since the last 10 years ;-))

No. There are no Java 20 images of any kind yet because Gradle doesn't support it until 8.3. The only other option is the dual-JDK of #248. If that's a solution that's appealing to you, lemme know and I'll work on merging and publishing it.

@JohannesLichtenberger
Copy link

I don't know if that means I'd have to change other parts of the Dockerfile in SirixDB. Maybe not, but otherwise I'd leave it for now, as I yesterday started a new job as an embedded software engineer, meaning I will not have much time to work on Sirix right now...

@keeganwitt
Copy link
Owner

I don't know if that means I'd have to change other parts of the Dockerfile in SirixDB. Maybe not, but otherwise I'd leave it for now, as I yesterday started a new job as an embedded software engineer, meaning I will not have much time to work on Sirix right now...

The Dockerfile no, but the Gradle files yes (for some users). It looks like you have that change already though. See here.

@keeganwitt
Copy link
Owner

keeganwitt commented Aug 17, 2023

8.3 just got released this morning!

https://docs.gradle.org/8.3/release-notes.html#full-support-for-java-20

@JohannesLichtenberger
Copy link

Yay, do you push the images?

@keeganwitt
Copy link
Owner

Yay, do you push the images?

docker-library/official-images#15221

@JohannesLichtenberger
Copy link

I've updated the Dockerfile, but I guess it needs some time until they are on docker.io

@JohannesLichtenberger
Copy link

@keeganwitt
Copy link
Owner

keeganwitt commented Aug 17, 2023

I've updated the Dockerfile, but I guess it needs some time until they are on docker.io

They haven't merged my PR yet that will kick off the build and push.

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

No branches or pull requests

3 participants