Execution plans are strange beasts at the moment when it comes
to expressing sub plans. All the steps are there, and it is the
step_keys_to_execute property that tells the engine what steps to
The snapshot layer did not account for this and never persisted that
Interestingly, this only happened because this bug pre-existed the
migration to snaphots. We were incorrectly rendering execution plans
in re-execution scenarios.
In this screenshot, we executed a single step but the other steps
are there but in a skipped state
With this change we only render the executed subplan
This was tricky to fix because we encode step_keys_to_execute in
multiple locations. The invariant check in the create_run machinery
ensures (hopefully) that no one screws up until we fix it properly.
This may be hotfix worthy given that this information in persisted.
Then again, the bug this fixes is a fairly minor display bug. However
correctly persisting the snapshot ASAP would be pretty nice.