You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe secretmanager is conflicting with something in spring boot docker?
Whether or not i use sm://xxx on other properties to get the variable, it will crash as soon as i have spring.config.import. So i just provided a minimized example
More findings: It seems docker is not crashed before Spring running. If i add a SpringApplicationRunListener to app and write some println() in the, it just print message successful.
So Spring does run successfully, but crashes when preparing the Environment. Since the logger is not available before preparing the Environment, there are not any logging
I don't know how to debug the graalvm native image program in docker, so that's all I know
Describe the bug
Library used:
'org.springframework.boot' version '3.2.4'
'spring-cloud-gcp-starter-secretmanager', version: '5.1.2'
'org.graalvm.buildtools.native' version '0.10.1'
Get a
application.yaml
like this:With a minimal application entrypoint:
Then compile it to Graalvm native image docker and run
The docker crashes as soon as it is executed, without any output
Extra attempts:
If i remove
spring.config.import
in application.yaml, all things works well. So this problem only occurs whensm://
is usedIf i don't package the native image as docker, it works fine:
OR:
Maybe secretmanager is conflicting with something in spring boot docker?
sm://xxx
on other properties to get the variable, it will crash as soon as i havespring.config.import
. So i just provided a minimized exampleSample
See my repository: https://github.com/czp3009/spring-boot-gcp-secretmanager-native-image-crash
Please follow the README to build and run the docker to see what happen
The text was updated successfully, but these errors were encountered: