Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Condense/simplify CLI output #32
The "parallel" output is pretty cool to watch, but it's verbose and hard to follow. When things break it's quite difficult to figure out what broke and why, while text is flying around the screen.
I believe there's a middle ground of informative and actionable that could be found with the CLI output.
changed the title from
Condense CLI output
Condense/simplify CLI output
Aug 28, 2017
I totally agree with you, but I'm also not sure what direction to go with this. Here are the challenges I have in displaying what is going on:
I took a brief survey of packer, ansible, and gradle (thanks to @plombardi89's suggestions) and they seem to deal with a number of similar problems. Based on their output I can think of the following potential improvements (these aren't mutually exclusive):
2.5 Same as (2) but formatted to be more machine friendly, e.g. prefix each line with context rather than just indicating context switches.
Those are my thoughts, but I'd be interested if you have any ideas on what you'd like to see here or any examples of tools you like that deal with similar problems?
I like the progress bars, and was thinking a similar thing. I'm not sure how you would be able to measure progress, but if you think that they can be somewhat meaningful then it's probably a good direction. In the "success path", it would be great -- all you would see is the progress bars moving and a nice "Done!" message.
Stern has great output for tailing output logs from multiple pods:
The colored prefixing could be something to draw inspiration from.
I feel like if errors streamed out in a style similar to Stern, as they happen, below the progress bars, it would be useful. The progress bars could also correlate the color with the log messages, and when it fails, the progress bar could indicate so.
Thanks, this is helpful. I will see how close I can get. As you mention, the progress indication might be a bit tricky, but I can think of a few things to try there, and worst case I think it would still be an improvement even with relatively coarse grained progress updates.
I just released a forge 0.3.1 with revamped output based on this thread. I think I was able to capture the spirit of the multiplexed output discussed.
I didn't end up getting anything workable with scrollbars. Basically after playing with it for a bit, I came to the following way of thinking:
Pretty much everything forge does is mostly instantaneous (on a functioning network) with the exception of docker build and docker push, and both of those things have extremely high variance. A first time build or push can take many minutes if no layers are cached, or they can take a few seconds, and there isn't really a good way for me to predict this. A scrollbar is therefore very likely to get stuck in one spot and make it appear is if forge is hanging under some circumstances.
So to deal with this I ended up going with a fairly simple scheme where by default docker build and docker push output are relayed (multiplexed if necessary) to the user, followed by a success/error summary at the end. The verbose option operates similarly except outputs all commands and http interactions, not just docker build & push.
I think this is definitely better than before, although I'm sure more usage will elicit more useful feedback. ;-) I'm gonna call this issue done, but please submit more issues if you have any thoughts on improving the new output.