feat: add await-condition task with height polling and SIGTERM action#36
Merged
feat: add await-condition task with height polling and SIGTERM action#36
Conversation
Implements the await-condition task type for the PreInitPlan bootstrap flow. The sidecar polls the local CometBFT /status RPC until a target block height is reached, then optionally sends SIGTERM to seid with SIGKILL escalation. New packages: - sidecar/rpc: StatusClient for CometBFT /status queries - sidecar/actions: process discovery via /proc and graceful stop with SIGTERM→SIGKILL escalation, context-cancellable Changes: - Add TaskAwaitCondition type and handler registration - Add AwaitConditionTask client struct with validation - Add signal.NotifyContext for graceful sidecar shutdown - Bump openapi.yaml to v0.6.0
0f06797 to
e0f28c1
Compare
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
await-conditiontask type for the PreInitPlan bootstrap flow. The sidecar polls the local CometBFT/statusRPC at 100ms intervals untillatest_block_height >= targetHeight, then optionally sends SIGTERM toseidwith SIGKILL escalation after 30s.sidecar/rpcpackage (StatusClientfor CometBFT status queries) andsidecar/actionspackage (process discovery via/procandGracefulStopwith context cancellation andisProcessGonehandling).signal.NotifyContextto the serve command for graceful sidecar shutdown on pod termination.New packages
sidecar/rpc/statusRPC client (500ms context timeout, no competinghttp.Clienttimeout)sidecar/actions/procscanning, requiresshareProcessNamespace: true) and graceful stop orchestrationKubernetes notes
shareProcessNamespace: trueandrestartPolicy: NeverterminationGracePeriodSecondsshould exceedDefaultGracePeriod(30s) to allow the sidecar to serve the final task statusCAP_KILLseidmust be launched directly (not via shell wrapper) for/proc/*/cmdlinematchingTest plan