simpleflow
simpleflow copied to clipboard
Simpleflow CLI: Some love
Having recently had to use the simpleflow CLI, I felt the need to fix some long-standing issues:
- filtering on a given period, for a given final status (in addition to the name, tags, etc.)
- displaying the history
- forgetting every damn time that the default output format is useless for further processing
So let's:
- improve
workflow.filter - add
workflow.history - add a
SIMPLEFLOW_FORMATenvironment variable
Great initative! There are many different things that could be done if you want to spend more time on this:
- In many subcommands, we need to pass the domain even if the envvar is present. If the domain was passed through a flag rather than a positional arg, we could set its default value to the envvar value.
- workflow.filter & workflow.list are redundant
-his not accepted as an alias of --help- workflow.filter: we can't filter on success / error / terminated / ... (can we?)
- We're missing the ability to add columns, and sort by a column
- the json view is not very usable: elements are arrays instead of objects, so we don't know what's what.
- tags should be exported as objects (key: value) rather than lists (assuming tags always have a
=? ) - It would feel much more natural to expose subcommands as
workflow listrather thanworkflow.list - It would feel more natural to distinguish between pure SWF things (
workflow.listet al) and Simpleflow-specific things (such asactivity.rerun) - For some reason,
simpleflow infodoesn't listSWF_DOMAIN? binaries.downloadis really obscure ?workflow.filtercould (should?) accept a much wider variety of time filters (or alternatively, we could embrace that any post-processing that isn't linked to API query should be done with jq)- when displaying version number, I think we treat them as floats.
workflow.filterdisplays3.70for BLA 3.7.
Of course, this is my christmas list, but you don't have to do any of this, just suggestions :)
workflow.tasksshould show the task id so that we can usetask.info
I agree 🙂 And I think the best way to do this will be adding a brand-new CLI, reverting to the legacy one to handle the current commands. What's your opinion?
It makes sense. This way, we don't break existing workflow.