quickwit
quickwit copied to clipboard
--mark-for-deletion on split list seems dangerous
Describe the bug
The split list
command is primarily an informational command but it has an option --mark-for-deletion
that takes destructive action. I get why this option exists, it's a nice convenience, but from a CLI design perspective it strikes me as a dangerous option on a command called split list
that is going to mainly be used for informational purposes.
Without reading the docs since the command implies it just lists splits I would expect --mark-for-deletion
to maybe limit the list of what's returned to just splits in that status or something but not actually result in deleting the data.
Expected behavior
If the intention of this command is to do more than just list splits and it's expected to add additional mutation features in the future, then the command may be better named split manage
or something similar.
Otherwise I'd either suggest adding the needed listing logic into the existing split mark-for-deletion
command or make it so that you can chain the commands together using pipes.
quickwit split list --index index_name --states PENDING --ids-only | quickwit split mark-for-deletion --index index_name