temporalio / temporalio/sdk-java

Native image descriptor for GraalVM in the temporal-spring-boot-starter-alpha

Open
#2,064 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
433
Forks
249
Avg merge
5d 6h
Merged PRs (30d)
26

Description

Is your feature request related to a problem? Please describe.
It would be nice to have native image descriptors as part of the temporal-spring-boot-starter-alphao

Similar to what already exists in the test-server
https://github.com/temporalio/sdk-java/tree/15df866f9c91219f6cf61533aee8fc2139ad7c93/temporal-test-server/src/main/resources/META-INF/native-image/io.temporal/temporal-test-server

Currently I am experiencing different build issues when trying to build a spring boot app native image.

Error example:
Error: Classes that should be initialized at run time got initialized during image building: [INFO] [creator] ch.qos.logback.core.util.StatusPrinter was unintentionally initialized at build time. To see why ch.qos.logback.core.util.StatusPrinter got initialized use --trace-class-initialization=ch.qos.logback.core.util.StatusPrinter [INFO] [creator] io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory$NopInstanceHolder the class was requested to be initialized at run time (from 'META-INF/native-image/native-image.properties' in 'file:///workspace/' with 'io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory$NopInstanceHolder' and from 'META-INF/native-image/io/temporal/temporal-serviceclient/native-image.properties' in 'file:///workspace/BOOT-INF/lib/temporal-serviceclient-1.23.2.jar' with 'io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory$NopInstanceHolder'). To see why io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory$NopInstanceHolder got initialized use --trace-class-initialization=io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory$NopInstanceHolder [INFO] [creator] ch.qos.logback.core.util.Loader was unintentionally initialized at build time. To see why ch.qos.logback.core.util.Loader got initialized use --trace-class-initialization=ch.qos.logback.core.util.Loader [INFO] [creator] ch.qos.logback.classic.Level was unintentionally initialized at build time. To see why ch.qos.logback.classic.Level got initialized use --trace-class-initialization=ch.qos.logback.classic.Level [INFO] [creator] io.grpc.netty.shaded.io.netty.buffer.UnpooledByteBufAllocator the class was requested to be initialized at run time (subtype of io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator). To see why io.grpc.netty.shaded.io.netty.buffer.UnpooledByteBufAllocator got initialized use --trace-class-initialization=io.grpc.netty.shaded.io.netty.buffer.UnpooledByteBufAllocator [INFO] [creator] io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator the class was requested to be initialized at run time (from 'META-INF/native-image/native-image.properties' in 'file:///workspace/' with 'io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator'). To see why io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator got initialized use --trace-class-initialization=io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator [INFO] [creator] ch.qos.logback.classic.Logger was unintentionally initialized at build time. To see why ch.qos.logback.classic.Logger got initialized use --trace-class-initialization=ch.qos.logback.classic.Logger [INFO] [creator] To see how the classes got initialized, use --trace-class-initialization=ch.qos.logback.core.util.StatusPrinter,io.grpc.netty.shaded.io.netty.util.internal.logging.Slf4JLoggerFactory$NopInstanceHolder,ch.qos.logback.core.util.Loader,ch.qos.logback.classic.Level,io.grpc.netty.shaded.io.netty.buffer.UnpooledByteBufAllocator,io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator,ch.qos.logback.classic.Logger [INFO] [creator

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the existing descriptors under temporal-test-server/src/main/resources/META-INF/native-image/io.temporal/temporal-test-server and compare them with the temporal-spring-boot-starter-alpha resources. Reproduce a Spring Boot native-image build using the reported initialization errors, then verify that descriptors for the starter prevent those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend, build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.