Loading section...
Stack-Based Undo/Redo for Pipeline Operations
Concepts: pyCommandPattern, pyUndoRedo, pyPipelineHistory
Every mature data platform has an operation history with undo and redo. Schema migrations, pipeline configuration changes, data transformations — all should be reversible. The command pattern with two stacks is the implementation: undo_stack holds executed operations, redo_stack holds undone operations. Execute pushes to undo_stack and clears redo_stack. Undo pops from undo_stack, reverses the operation, and pushes to redo_stack. Redo pops from redo_stack, re-executes, and pushes back to undo_stack. Command Pattern: Two-Stack Undo/Redo DE Applications The redo_stack.clear() on execute is critical and often forgotten. It enforces the rule that after any new action, the redo history is gone. If the user executes action A, undoes it, then executes action B, they cannot redo A — because A happ