docs: design for decoupling snapshot generation from publishing#107
Merged
docs: design for decoupling snapshot generation from publishing#107
Conversation
Introduces a nested TendermintSnapshotGenerationConfig under SnapshotGenerationConfig and a present/absent publish struct so operators can generate local Tendermint snapshots without uploading to S3. Matches the existing StateSyncSource / SnapshotSource presence-as-toggle pattern in common_types.go. No launched product, so no backward-compat concern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Replace implicit sidecar signal with a dedicated configure-snapshot-publish plan task, mirroring ConfigureStateSync. Publishing becomes self-describing in .status.plan rather than keyed on env-var absence. - Pin cross-field validation (publish set -> keepRecent >= 2, empty snapshotGeneration) to the existing fullNodePlanner.Validate / archiveNodePlanner.Validate hooks. No admission webhook. Note why config-validate is the wrong layer for this rule. - Update rollout steps and related-work pointers accordingly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The sidecar task (TaskTypeSnapshotUpload / SnapshotUploadTask) already exists in seictl v0.0.30. The controller-side wiring for it was deleted in #89 along with the monitor-task subsystem. This design re-introduces that wiring as a plan task rather than inventing a new sidecar task. Updates: - Rewrite sec. 2 to reference the existing seictl types, not a new task - Adjust rollout step to describe re-wiring rather than defining - Related work now cites the seictl task and the deletion commit Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 tasks
bdchatham
added a commit
that referenced
this pull request
Apr 21, 2026
* feat: decouple snapshot generation from publishing Refactors SnapshotGenerationConfig to nest a TendermintSnapshotGenerationConfig sub-struct (extensible for future snapshot modes) with an optional Publish struct whose presence toggles S3 upload. Absence of Publish means snapshots are kept on disk only. Re-wires the existing seictl TaskTypeSnapshotUpload sidecar task as a fire-and-forget plan task, inserted into the init progression immediately before mark-ready only when Publish is set. Restores controller-side plumbing that was removed in #89 with the monitor-task subsystem, now as a plan task rather than a monitor task. Cross-field validation lives in each per-mode planner's Validate(node) hook, wrapping errors with its own mode prefix (fullNode: / archive:) — no shared helper takes a mode parameter. Rules: empty snapshotGeneration is rejected; keepRecent must be >= 2 when Publish is set (upload algorithm requires the second-to-latest snapshot). Implements the design in docs/design-snapshot-publish-config.md (merged via #107). No backward-compat concerns: product has not launched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: address PR review feedback - Inline the snapshot-upload gate into buildBasePlan and buildPostBootstrapProgression; remove the maybeInsertSnapshotUpload helper (called in only two places, "maybe" prefix was unclear). - Trim validateSnapshotGeneration doc comment to a single line — the rules are self-evident from the code; only the caller-wrap convention is worth calling out. Tracking issue for the sei-config rename suggestion: sei-protocol/sei-config#6 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <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
TendermintSnapshotGenerationConfigunderSnapshotGenerationConfigso we can grow sibling modes (seidb, app-layer, …) without renaming fields.publish: {}sub-struct whose presence enables S3 upload — absence means "generate + retain locally only." Closes the gap where a full-node can't produce N on-disk snapshots without also pushing to S3.enablePersistence/enabled: boolin favor of present/absent struct to match existing CRD precedent (StateSyncSource struct{}atapi/v1alpha1/common_types.go:107, and thesnapshot: { stateSync: {} | s3: {...} }shape already used for bootstrap sources).Key shape
Open questions deferred to LLD
publish set ⇒ keepRecent >= 2) lives — Condition on reconcile vs. OpenAPIoneOfvs. new webhook.publishis omitted.Test plan
publish: {}vs.enabled: bool) — biggest design decision in the docSnapshotGenerationConfig { Tendermint: ... }) is worth the nesting level vs. collapsing totendermintSnapshotGeneration:directly on the spec🤖 Generated with Claude Code