Add production data rollout readiness checks#112
Merged
Conversation
Introduce a read-only rollout production-data-audit command that summarizes the real v1 jetpack_monitor_sites shape before a host window. The audit reports bucket coverage, active row counts, status and interval distributions, malformed URL counts, existing non-running projections, and duplicate active blog_id rows without printing monitor URLs. Add a guarded legacy-status-bootstrap command for seeding v2 event rows from existing v1 non-running site_status values. The command is dry-run by default, requires --execute for writes, preserves legacy last_status_change where available, and refuses duplicate active blog_id rows unless an operator explicitly overrides the guardrail. Document the new pre-rollout gates in the migration runbook, quick reference, and roadmap so production rehearsals account for the real table shape before projection-drift becomes a hard rollout gate.
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
Adds rollout tooling for the real production
jetpack_monitor_sitesshape before a v1-to-v2 host cutover. The newrollout production-data-auditcommand reports bucket coverage, active row counts, status and interval distributions, malformed URL counts, existing non-running v1 projections, and active duplicateblog_idrows without printing monitor URLs.Adds
rollout legacy-status-bootstrapas an explicit dry-run-by-default write step for seeding v2 events from existing v1 non-runningsite_statusrows. The write path requires--execute, preserveslast_status_changeas the event start when present, and refuses duplicate activeblog_idrows unless the operator deliberately overrides that guardrail.Updates the rollout runbook, quick reference, and roadmap so Systems can run the production-data audit and bootstrap before treating
projection-driftas a hard gate.Why
A production table dump showed the legacy table is still v1-shaped, which is good for the sidecar-table rollout design, but it also surfaced existing non-running rows and a small cohort of duplicate active
blog_idrows. Without this tooling, a fresh v2 event store would make those existing non-running rows look like projection drift, and duplicate activeblog_idrows could be collapsed by the current per-blog runtime identity model.Operator examples
Validation
go test ./...