feat: event versioning migration tool in eskit CLI #236

Open
opened 2026-03-10 10:14:41 +00:00 by ash · 0 comments
Owner

Problem

We have upcasters for event schema evolution (read-time transformation), but no tool to permanently rewrite events with the new schema. Over time, upcaster chains grow and every read pays the transformation cost.

Solution

Add eskit migrate events CLI command that:

  1. Reads all events (or filtered by stream/type)
  2. Applies upcaster chain
  3. Writes back the transformed events (new version, same stream position)
  4. Removes the need for runtime upcasting

Safety:

  • Dry-run mode by default (--apply to execute)
  • Progress bar with event count
  • Backup reminder / snapshot before migration
  • Atomic per-stream (all events in a stream migrate together or none)
  • Report: N events migrated, M streams affected, K upcasters applied

Pillar: Performance (remove runtime upcasting cost), Developer Experience

## Problem We have upcasters for event schema evolution (read-time transformation), but no tool to permanently rewrite events with the new schema. Over time, upcaster chains grow and every read pays the transformation cost. ## Solution Add `eskit migrate events` CLI command that: 1. Reads all events (or filtered by stream/type) 2. Applies upcaster chain 3. Writes back the transformed events (new version, same stream position) 4. Removes the need for runtime upcasting **Safety:** - Dry-run mode by default (`--apply` to execute) - Progress bar with event count - Backup reminder / snapshot before migration - Atomic per-stream (all events in a stream migrate together or none) - Report: N events migrated, M streams affected, K upcasters applied ## Pillar: Performance (remove runtime upcasting cost), Developer Experience
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#236
No description provided.