#6289 fix: flyteadmin doesn't shutdown servers gracefully
Pull request opened by
lowc1012
## Tracking issue
#6274
## Why are the changes needed?
To handle SIGTERM properly, ensure cleanup of resources and provide smooth user experience
## What changes were proposed in this pull request?
Implement graceful shutdown for flyteadmin servers
## How was this patch tested?
### Labels
Please add one or more of the following labels to categorize your PR:
•
added: For new features.
•
changed: For changes in existing functionality.
•
deprecated: For soon-to-be-removed features.
•
removed: For features being removed.
•
fixed: For any bug fixed.
•
security: In case of vulnerabilities
This is important to improve the readability of release notes.
### Setup process
### Screenshots
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
### Summary by Bito
This PR implements graceful shutdown mechanisms for flyteadmin servers by introducing configurable timeout settings (replacing hardcoded 10-second values), adding signal handling and timeout-based contexts. It enhances error handling in gRPC server startup, updates configuration files with command-line flag support, and ensures proper termination of both HTTP and gRPC servers to prevent resource leaks and improve service reliability.
Unit tests added: False
Estimated effort to review (1-5, lower is better): 1
flyteorg/flyte