fix(helm): enable graceful termination and overrides for celery worker#41175
fix(helm): enable graceful termination and overrides for celery worker#41175mjlshen wants to merge 1 commit into
Conversation
Code Review Agent Run #b5120cActionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
f0c7eb0 to
88a5c45
Compare
Code Review Agent Run #00e35fActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
rusackas
left a comment
There was a problem hiding this comment.
The exec fix LGTM. One thing in README.md: the bumped line reads Version: 0.16.3 but the badge URL still points at Version-0.16.2-informational. Looks like a partial helm-docs regen — can you re-run helm-docs so they match @mjlshen?
Currently, the worker startup command runs celery without `exec`. When the shell script is the container's entrypoint, the shell stays PID 1 and celery runs as its child. Since the shell installs no handler for SIGTERM, the signal delivered on Kubernetes pod termination never reaches celery, causing it to get SIGKILLed when the grace period expires. This drops in-flight tasks and leaves the worker status as online. Adding `exec` before the celery command ensures that celery replaces the shell as PID 1, allowing it to receive and handle termination signals directly. Additionally, this adds support for overriding `lifecycle` hooks and `terminationGracePeriodSeconds` for the superset worker deployment, matching the server (supersetNode) capabilities to allow custom shutdown commands (such as celery control shutdown) and extended drain periods." Signed-off-by: Michael Shen <mishen@umich.edu>
88a5c45 to
f8b200e
Compare
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Yes - thanks! Just to note there's a bit of a race between this MR and #41173 - whichever merges first should be 0.16.3, I will leave that call up to the maintainers. Once one merges in, I can update the remaining MR to move to version 0.16.4 |
Code Review Agent Run #c6baedActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
Similar to #41173
Currently, the worker startup command runs celery without
exec. When the shell script is the container's entrypoint, the shell stays PID 1 and celery runs as its child. Since the shell installs no handler for SIGTERM, the signal delivered on Kubernetes pod termination never reaches celery, causing it to get SIGKILLed when the grace period expires. This drops in-flight tasks and leaves the worker status as online.Adding
execbefore the celery command ensures that celery replaces the shell as PID 1, allowing it to receive and handle termination signals directly.Additionally, this adds support for overriding
lifecyclehooks andterminationGracePeriodSecondsfor the superset worker deployment, matching the server (supersetNode) capabilities to allow custom shutdown commands (such as celery control shutdown) and extended drain periods."TESTING INSTRUCTIONS
ADDITIONAL INFORMATION