Skip to content
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

Fix QuarkusMainLauncher not returning exit code #42252

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

snazy
Copy link
Contributor

@snazy snazy commented Jul 31, 2024

QuarkusMainLauncher always returns 0, because currentApplication is set to null in io.quarkus.runtime.ApplicationLifecycleManager#run(io.quarkus.runtime.Application, java.lang.Class<? extends io.quarkus.runtime.QuarkusApplication>, java.util.function.BiConsumer<java.lang.Integer,java.lang.Throwable>, java.lang.String...).

This change introduces a new callback to ApplicationLifecycleManager used by StartupActionImpl to know whether the application was actually started or not.

@gsmet gsmet marked this pull request as ready for review August 1, 2024 08:29
@gsmet
Copy link
Member

gsmet commented Aug 1, 2024

Let's get CI running and see how it goes. We definitely need this for 3.13.1.

@geoand
Copy link
Contributor

geoand commented Aug 1, 2024

Thanks a lot for this!

I presume the commit history can be improved on this one

@quarkus-bot

This comment has been minimized.

`QuarkusMainLauncher` always returns `0`, because `currentApplication` is set to `null` in `io.quarkus.runtime.ApplicationLifecycleManager#run(io.quarkus.runtime.Application, java.lang.Class<? extends io.quarkus.runtime.QuarkusApplication>, java.util.function.BiConsumer<java.lang.Integer,java.lang.Throwable>, java.lang.String...)`.

This change introduces a new callback to `ApplicationLifecycleManager` used by `StartupActionImpl` to know whether the application was actually started or not.
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI was happy, I just squashed the commits so we can merge.

@gsmet gsmet merged commit 85417b0 into quarkusio:main Aug 1, 2024
4 of 5 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Aug 1, 2024
@gsmet gsmet modified the milestones: 3.14 - main, 3.13.1 Aug 1, 2024
@snazy snazy deleted the qml-no-exit-code branch August 1, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing/3.13.0: QuarkusMainLauncher always returns exit code 0 for integration tests
3 participants