Skip to content

Added manager shutdown after grpc termination#95

Closed
julianstephen wants to merge 2 commits intokagenti:mainfrom
julianstephen:rollover-error
Closed

Added manager shutdown after grpc termination#95
julianstephen wants to merge 2 commits intokagenti:mainfrom
julianstephen:rollover-error

Conversation

@julianstephen
Copy link
Copy Markdown
Collaborator

Summary

Towards a fix for #25. Added manager shutdown after grpc server termination. If this is due to an issue in the cpex side, this should fix it. This new line should shuts down registered plugins, clear the plugin registry and clean up state.

Tested by repeatedly restarting plugins-adapter pod. Tried 5 times in a row without issues. 🤞

Signed-off-by: julianstephen <julian.stephen@gmail.com>
@julianstephen julianstephen requested a review from a team as a code owner April 9, 2026 14:43
Signed-off-by: julianstephen <julian.stephen@gmail.com>
Comment thread src/server.py
await server.start()
# wait forever
await server.wait_for_termination()
await manager.shutdown()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would we want wait_for_termination() in try/finally to ensure this new line runs on all exit paths (SIGTERM, KeyboardInterrupt, unexpected errors), not just graceful termination?

@julianstephen
Copy link
Copy Markdown
Collaborator Author

Superseded by pull #96

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.

2 participants