Files
floci/src/test
Ben Younes 1095d934d0 fix(cloudmap): initialize-at-run-time for GraalVM native image (#1271)
* fix(cloudmap): initialize-at-run-time for GraalVM native image (#1234)

CloudMapService has a static SecureRandom field (RANDOM) used by
randomId() and generateHostedZoneId(). GraalVM native-image builds
fail because the SecureRandom instance is captured in the image heap
with a frozen seed.

Add CloudMapService to the quarkus.native.additional-build-args
--initialize-at-run-time list so the class is initialized at runtime
instead of build time, matching the existing pattern used by
AcmService, SesService, Route53Service, KmsService and others.

Closes #1234

* test(native): guard --initialize-at-run-time for static SecureRandom fields

Add a JVM-level CI test that scans every main-source class for a static
Random/SecureRandom/SplittableRandom field and asserts each is registered
under quarkus.native.additional-build-args --initialize-at-run-time in
application.yml.

The native-image heap failure this prevents only surfaced in the nightly
native build, never in JVM CI — which is how #1217 (CloudMapService) slipped
through. This moves the check into ordinary CI.

RED  (fix line removed): fails naming CloudMapService.
GREEN (fix in place):    all 8 classes with static SecureRandom fields covered.
2026-06-10 17:53:58 -05:00
..