-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialization Tasks failing #41113
Comments
Thanks for reporting! As you've already investigated this, would you like to contribute a fix? |
I am not sure of the intention of the refactor, as it clearly removed the null check - i.e. if the shutdown listeners are supposed to be injected by this point? |
What likely happened is that when things were refactored, this use case was not taken into account |
I am currently not in a position to contribute code, but happy to help where I can with this. |
No problem! #41117 is the fix |
Fix NPE when `QUARKUS_INIT_AND_EXIT` is used
Fixes: quarkusio#41113 (cherry picked from commit 4fb6de1)
Describe the bug
We have been using Liquibase with Kubernetes where in our own helm charts we are configuring a job to run with "QUARKUS_INIT_AND_EXIT" to execute the schema migration.
This was working up to version 3.8.x, and now fails with newer versions due to a NullPointerException on startup - this stops the deployment progressing.
Following an investigation, it appears that the graceful shutdown code was refactored after 3.8.x which removed the null check for shutdown listeners - however it appears any shutdown listeners are not actually injected until after the point when "init and exit" has finished, leading to the NPE.
Expected behavior
The Quarkus container should run the Liquibase migration and then exit cleanly.
Actual behavior
The Liquibase migration happens as expected but the contianer does not shutdown without the error - stopping the appplication containers from starting.
How to Reproduce?
Running any Quarkus application with environment variable "QUARKUS_INIT_AND_EXIT" set to true.
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
3.11.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: