Skip to content

Implement select --feature abstractions to ease implementation #121

@l-monninger

Description

@l-monninger

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

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.

Metadata

Metadata

Assignees

Labels

featureThis issue introduces new behaviorpriority:highThis issue should be worked on actively but progress on other issues can take place.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions