Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simpleflow CLI: Some love #443

Open
ybastide opened this issue Dec 3, 2024 · 4 comments
Open

Simpleflow CLI: Some love #443

ybastide opened this issue Dec 3, 2024 · 4 comments

Comments

@ybastide
Copy link
Contributor

ybastide commented Dec 3, 2024

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_FORMAT environment variable
@ewjoachim
Copy link
Contributor

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
  • -h is 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 list rather than workflow.list
  • It would feel more natural to distinguish between pure SWF things (workflow.list et al) and Simpleflow-specific things (such as activity.rerun)
  • For some reason, simpleflow info doesn't list SWF_DOMAIN ?
  • binaries.download is really obscure ?
  • workflow.filter could (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.filter displays 3.70 for BLA 3.7.

Of course, this is my christmas list, but you don't have to do any of this, just suggestions :)

@ewjoachim
Copy link
Contributor

  • workflow.tasks should show the task id so that we can use task.info

@ybastide
Copy link
Contributor Author

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?

@ewjoachim
Copy link
Contributor

It makes sense. This way, we don't break existing workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants