feat: add SIGUSR1/SIGUSR2 reinit signals#880
Open
marxus wants to merge 4 commits into
Open
Conversation
SIGUSR1 - soft reinit: disables existing bindings, reloads hook configs, re-enables kubernetes watchers and schedules. onStartup hooks do not re-run. SIGUSR2 - full reset: same as SIGUSR1 but also re-runs onStartup hooks, emulating a process restart without interrupting in-flight executions. On any --config failure during reinit the process exits with code 1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Verifies that SIGUSR1 (fullReset=false) does not re-enqueue onStartup tasks and that SIGUSR2 (fullReset=true) does, while both enqueue binding-enable tasks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Captures controller pointers before Reinit and verifies they are new instances after, proving the disable+rebuild cycle ran. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SIGUSR1— soft reinit: reloads hook configs, restarts kubernetes watchers and schedules, skipsonStartuphooksSIGUSR2— full reset: same as SIGUSR1 but also re-runsonStartuphooks, emulating a process restart without interrupting in-flight executions--configfailure during reinit the process exits with code 1Test plan
go test ./pkg/shell-operator/...kill -USR1 <pid>, verify hooks reload in logs without onStartup re-runningkill -USR2 <pid>, verify full reload including onStartup hooks🤖 Generated with Claude Code