-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Summary
The mtma
client is supposed to feature select --feature
flags which make it possible to select multiple migrations
and checks
to be run in a stack. Provide an abstraction which suits these objectives w.r.t. the current Config
API.
Here are some example commands as expressed in the README.md
mtma migration node migrate select --replay
mtma checked-migration migrate select --node-replay
mtma checked-migration migrate select --migrator-post-l1-merge
mtma checked-migration migrate select --check-balances-equal
All of these should, for example, be selectable together unless internally invalidated at runtime:
They will likewise eventually have an --all-required
that indicates a checked-migration
running all required migration
steps and checks
:
At some point, we may chose to bring in the tracking
migration s.t. we can have something like the validation period described here with an automatic cutover upon completion.
Warning
Figuring out how to flatten config args is likely going to be difficult because clap
doesn't support prefixes when flattening at the moment. It's worth giving a shot at a general way to do this before falling back to just having implementers try to ensure their Config
arguments don't collide.
I would recommend taking an initial shot at this generalization upfront and then potentially progressing while implementers work on their different subcommand unifications, i.e., ad hoc if their are situations that can't be easily resolved.
Tip
A lot of this comes down to how you form Config
structs for select
commands and whether you can unify as much.