Skip to content

Add production data rollout readiness checks#112

Merged
chrisbliss18 merged 1 commit into
v2from
feature/rollout-production-data-readiness
May 14, 2026
Merged

Add production data rollout readiness checks#112
chrisbliss18 merged 1 commit into
v2from
feature/rollout-production-data-readiness

Conversation

@chrisbliss18
Copy link
Copy Markdown
Contributor

Summary

Adds rollout tooling for the real production jetpack_monitor_sites shape before a v1-to-v2 host cutover. The new rollout production-data-audit command reports bucket coverage, active row counts, status and interval distributions, malformed URL counts, existing non-running v1 projections, and active duplicate blog_id rows without printing monitor URLs.

Adds rollout legacy-status-bootstrap as an explicit dry-run-by-default write step for seeding v2 events from existing v1 non-running site_status rows. The write path requires --execute, preserves last_status_change as the event start when present, and refuses duplicate active blog_id rows 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-drift as 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_id rows. Without this tooling, a fresh v2 event store would make those existing non-running rows look like projection drift, and duplicate active blog_id rows could be collapsed by the current per-blog runtime identity model.

Operator examples

./jetmon2 rollout production-data-audit --bucket-min=0 --bucket-max=<max>
./jetmon2 rollout legacy-status-bootstrap --bucket-min=0 --bucket-max=<max>
./jetmon2 rollout legacy-status-bootstrap --bucket-min=0 --bucket-max=<max> --execute

Validation

go test ./...

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.
@chrisbliss18 chrisbliss18 merged commit 1caa330 into v2 May 14, 2026
2 checks passed
@chrisbliss18 chrisbliss18 deleted the feature/rollout-production-data-readiness branch May 14, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant