From 8927727aa90df00e1d98ae16dd679b4e36f5d1a4 Mon Sep 17 00:00:00 2001 From: tschuehly Date: Sun, 8 Nov 2026 12:46:34 +0100 Subject: [PATCH 1/3] CI: smoke-test the native image, including an empty chart --- .github/workflows/native-image.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/native-image.yml b/.github/workflows/native-image.yml index f15c569..3aaed82 100644 --- a/.github/workflows/native-image.yml +++ b/.github/workflows/native-image.yml @@ -36,6 +36,13 @@ jobs: label=$(docker image inspect -f '{{index .Config.Labels "service"}}' "$IMAGE:${{ github.sha }}") echo "service label: '$label'" test "$label" = fullstack-with-spring + - name: Smoke test native image + run: | + docker run -d --name smoke -p 8080:8080 "$IMAGE:${{ github.sha }}" + for i in $(seq 30); do curl -fs localhost:8080/ >/dev/null && break; sleep 1; done + for path in / /tables /forms "/lineChartComponent?name=Sales"; do + curl -fsS -o /dev/null -w "%{http_code} $path\n" "localhost:8080$path" || { docker logs smoke | tail -40; exit 1; } + done - if: github.event_name == 'push' && github.ref == 'refs/heads/master' run: docker save "$IMAGE:${{ github.sha }}" | gzip > image.tar.gz - if: github.event_name == 'push' && github.ref == 'refs/heads/master' From 034a993577ee51b407286065a963f9adf0896086 Mon Sep 17 00:00:00 2001 From: tschuehly Date: Sun, 8 Nov 2026 12:46:41 +0100 Subject: [PATCH 2/3] Native hint for kotlin.collections.EmptyList (empty chart returned 500) --- .../kotlin/de/tschuehly/fullstackdemo/common/NativeHints.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/de/tschuehly/fullstackdemo/common/NativeHints.kt b/src/main/kotlin/de/tschuehly/fullstackdemo/common/NativeHints.kt index c13368d..cdc7b7b 100644 --- a/src/main/kotlin/de/tschuehly/fullstackdemo/common/NativeHints.kt +++ b/src/main/kotlin/de/tschuehly/fullstackdemo/common/NativeHints.kt @@ -3,6 +3,8 @@ package de.tschuehly.fullstackdemo.common import de.tschuehly.fullstackdemo.web.component.person.form.PersonFormViewComponent import de.tschuehly.spring.viewcomponent.thymeleaf.ViewContext import org.springframework.aot.hint.BindingReflectionHintsRegistrar +import org.springframework.aot.hint.MemberCategory +import org.springframework.aot.hint.TypeReference import org.springframework.aot.hint.RuntimeHints import org.springframework.aot.hint.RuntimeHintsRegistrar import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider @@ -27,6 +29,8 @@ class NativeHints : RuntimeHintsRegistrar { } val contexts = scanner.findCandidateComponents("de.tschuehly.fullstackdemo") .map { Class.forName(it.beanClassName, false, classLoader) } + // Kotlin reflection resolves emptyList()'s class when a chart has no data (/lineChartComponent?name=Sales). + hints.reflection().registerType(TypeReference.of("kotlin.collections.EmptyList"), *MemberCategory.entries.toTypedArray()) BindingReflectionHintsRegistrar().registerReflectionHints( hints.reflection(), *(contexts + PersonFormViewComponent.PersonFormDTO::class.java).toTypedArray() ) From 41ee9c5c109ddce3ffc1f5ed193d96e461512d0e Mon Sep 17 00:00:00 2001 From: tschuehly Date: Sun, 8 Nov 2026 12:52:09 +0100 Subject: [PATCH 3/3] Gradle wrapper: 120 s download timeout (10 s timed out in CI) --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2e11132..e311d96 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip -networkTimeout=10000 +networkTimeout=120000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists