fix: stop thread pools when an error occurs during startup by lion7 · Pull Request #3107 · operator-framework/java-operator-sdk · GitHub
Skip to content

fix: stop thread pools when an error occurs during startup#3107

Merged
csviri merged 2 commits into
operator-framework:mainfrom
lion7:main
Jan 7, 2026
Merged

fix: stop thread pools when an error occurs during startup#3107
csviri merged 2 commits into
operator-framework:mainfrom
lion7:main

Conversation

@lion7

@lion7 lion7 commented Dec 30, 2025

Copy link
Copy Markdown
Contributor

Fixes #3099
Tested by running with a locally built snapshot, it fixed the issue.

@csviri

csviri commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

@lion7

lion7 commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

@csviri I altered the order a bit so the controllerManager is stopped before the executor, so the graceful shutdown keeps working properly.

@csviri

csviri commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

Thank you @lion7 , could you pls also add an integration test for the base API:

https://github.com/operator-framework/java-operator-sdk/blob/589b7a6c8654cad13ff2317fddb51693fcd6d4c3/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi

Where without the junit extension you just create an Operator with a reconiler (dummy) and stop it without start, just to check if this don't throw an exception. I think that is a bare minimum for this (beside some manual testing)

@lion7

lion7 commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

I added a unit test per your suggestion

@csviri csviri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thank you!

lion7 added 2 commits January 6, 2026 13:16
Signed-off-by: Gerard de Leeuw <gdeleeuw@leeuwit.nl>
Signed-off-by: Gerard de Leeuw <gdeleeuw@leeuwit.nl>
@csviri

csviri commented Jan 6, 2026

Copy link
Copy Markdown
Collaborator

@csviri csviri merged commit b775767 into operator-framework:main Jan 7, 2026
85 of 151 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thread pools are not stopped when an error occurs during startup

4 participants