feat: add monitor task infrastructure for shadow replayer comparison#32
Merged
feat: add monitor task infrastructure for shadow replayer comparison#32
Conversation
Add a third task category — monitor tasks — that the controller submits once in Running phase and polls each reconcile for completion. When a monitor task reaches a terminal state, the controller sets a Condition and emits a Kubernetes Event. The first (and currently only) monitor task is result-export in comparison mode: the sidecar compares local block execution results against a canonical RPC endpoint and completes when app-hash divergence is detected. Key changes: - MonitorTask struct on SeiNodeStatus with SubmittedAt/CompletedAt timestamps for observability - Rename PlannedTaskStatus → TaskStatus for cross-context clarity - ResultExportComplete Condition with reasons: DivergenceDetected, TaskFailed, TaskLost - Sidecar-lost-task detection: ErrNotFound after successful submission immediately marks Failed (sidecar Submit is synchronous) - Early return on optimistic lock conflicts to avoid wasted API calls - Immediate requeue on terminal state for fast downstream reaction - Remove dead scheduled-mode result-export code (CanonicalRPC is now required on ResultExportConfig) - Bump seictl to v0.0.24 (adds CanonicalRPC to ResultExportTask)
Use planner.ResultRequeueImmediate (RequeueAfter: 1ms) instead of the
deprecated ctrl.Result{Requeue: true} to satisfy staticcheck SA1019.
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
ErrNotFoundafter successful submission immediately marksFailed(sidecarSubmitis synchronous, so not-found means the process restarted).ResultExportCompleteCondition with reasonsDivergenceDetected,TaskFailed,TaskLostfor kubectl visibility and alerting.CanonicalRPCis now required).PlannedTaskStatus→TaskStatusfor cross-context clarity.Test plan
ensureMonitorTask: submit once, idempotent skip, submit errorpollMonitorTasks: completed, failed, still running, skip completed, sidecar lost task, invalid UUID, transient error, unknown error message, empty mapreconcileRuntimeTasks: monitor mode submission, replayer without ResultExport, poll requeue, conflict early returnResultExportMonitorTaskreturns/nil for all node typesmake manifests generate— CRDs regeneratedgolangci-lint run— 0 issues