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

Add a quiet flag to remove superfluous output #237

Open
tantalic opened this issue Sep 13, 2016 · 5 comments
Open

Add a quiet flag to remove superfluous output #237

tantalic opened this issue Sep 13, 2016 · 5 comments

Comments

@tantalic
Copy link

Currently deis commands output a "header" as the first line of output, for example deis apps:list will output something like:

=== Apps
casual-quacking
hidden-mongoose
zephyr-instinct

In some situations command may also output some warning:

!    WARNING: Client and server API versions do not match. Please consider upgrading.
!    Client version: 2.3
!    Server version: 2.2
=== Apps
casual-quacking
hidden-mongoose
zephyr-instinct

It would make it easier to use the output of deis commands as input to other commands if a -q --quiet flag was available which removed the superfluous output.

@tantalic
Copy link
Author

This came up as part of upgrading to Workflow v2.5 and needing to convert all my applications from replication controllers to deployments. I am sure there are other instances that I have not yet thought of where this would be useful. It would also make it easy to provide one-liners in documentation as part of upgrade processes in the future for such tasks.

@Joshua-Anderson
Copy link
Contributor

Deis prints the warning message to stderr, so that can be masked be redirecting the output, as a workaround for now. I saw your -o issue as well, is there any preference in priority between the two? I'd personally think that json is probably better for machine parsing, so it might be more useful to tackle first. I can also see that quiet mode could be helpful for basic bash stuff though.

@Joshua-Anderson
Copy link
Contributor

Joshua-Anderson commented Sep 13, 2016

Also, deis don't really use return codes at all rigt now (I think everything returns 1) that needs to be fixed before error handling in quiet mode can really be useful.

@tantalic
Copy link
Author

I have mixed feelings on prioritization of issues, because I think they have different but overlapping use cases. A -o option is best for machine parsing and more complex data-pipelining tasks while a -q option is better for quick/simple scripting. It is certainly possible to use tools such as jq for scripting tasks, but that isn't really in the "standard" unix toolbox for most users.

With all that said (and without knowing which seems easiest to implement) the -o option does give the most flexibility if users step out of the standard unix tools so it may make the most sense for prioritization.

@Cryptophobia
Copy link

This issue was moved to teamhephy/workflow-cli#19

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

No branches or pull requests

3 participants