quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.77k stars 2.68k forks source link

Bamboo agent does not build the native image after upgrading from 3.9.1 to 3.9.2 #39879

Closed DisterDE closed 7 months ago

DisterDE commented 7 months ago

Describe the bug

Hello.

The renovate bot updated the application dependency versions from 3.9.1 to 3.9.2, and the native build no longer builds. Building two Kotlin projects (aws lambda & default web app) using Gradle 8.7 and Bamboo agents.

Build command:

./gradlew build
        -Dquarkus.package.type=native
        -Dquarkus.native.remote-container-build=true
        -Dquarkus.native.builder-image=quarkus/ubi-quarkus-mandrel-builder-image:jdk-17
        -Dnative-image.xmx=6g
        --info 
        --stacktrace

log.txt

Thanks.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

openjdk 17.0.10 2024-01-16 LTS

Mandrel or GraalVM version (if different from Java)

MANDREL 23.0.3.0 JDK 17.0.10+7

Quarkus version or git rev

3.9.2

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.7

Additional information

No response

quarkus-bot[bot] commented 7 months ago

/cc @Karm (mandrel), @galderz (mandrel), @geoand (kotlin), @zakkak (mandrel,native-image)

geoand commented 7 months ago

Thanks for reporting.

I'll let my esteemed colleagues add more, but essentially the fact that it worked previously could be considered an accident.

@zakkak @maxandersen @jponge @cescoffier another instance of GraalVM 17 :)

jponge commented 7 months ago

Does the native compilation works with a Java 21 variant?

DisterDE commented 7 months ago

We are using the sonar plugin and it doesn't support jdk21. So we have no possibility to work with jdk21.

DisterDE commented 7 months ago

But everything is okay with the 3.7.4, 3.8.3, and 3.9.1 quarkus versions. They were built successfully with the same Docker builder image and the same jdk.

cescoffier commented 7 months ago

What @jponge suggested is to change:

        -Dquarkus.native.builder-image=quarkus/ubi-quarkus-mandrel-builder-image:jdk-17

To

        -Dquarkus.native.builder-image=quarkus/ubi-quarkus-mandrel-builder-image:jdk-21

not your Java/JVM version.

jponge commented 7 months ago

See https://github.com/quarkusio/quarkus/commit/b35ae008f0e84585f37b80dd1861b208ed6fd79a

jponge commented 7 months ago

@DisterDE Is there any possibility you could also check with a custom build of Quarkus on the main branch?

./mvnw -Dquickly then bump your dependencies to 999-SNAPSHOT

zakkak commented 7 months ago

Looks like a duplicate of https://github.com/quarkusio/quarkus/issues/39819

The issue should indeed be fixed on main (and is expected to be backported to 3.9).

zakkak commented 7 months ago

but essentially the fact that it worked previously could be considered an accident.

I think we should use different wording here. It didn't really work by accident as we are actually testing Quarkus with Mandrel 23.0 on a weekly base (which indeed caught the issue).

The thing is that supporting Mandrel 23.0 is not a high priority, so such failures might not get immediate attention (as it happened and 3.9.2 got out with the issue). Moving forward when using an older Mandrel version users will get a warning that will hopefully break the assumption that these versions get the same attention as the latest version, see https://github.com/quarkusio/quarkus/pull/39866.

HTH

geoand commented 7 months ago

Fair enough :)

DisterDE commented 7 months ago

The JDK21 image works fine, thanks.