Use a non-interactive progress writer in non-TTY environments#405
Merged
Conversation
acfa8a8 to
49d05be
Compare
Author
|
I've now fixed the failing tests 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #175
TL;DR
The current default progress writer uses interactive spinners on an event loop; while this style of output is useful in user terminal environments to give constant feedback of progression, it is not ideal in non-TTY environments, such as in continuous integration builds.
What?
This PR solves the CI issue by renaming the existing
text.QuietProgresstotext.InteractiveProgress, as it's not really "quiet", and then creates a new implementation oftext.QuietProgresswhich only writes the step functions and not the intermediary writes to stdout. Lastly, we have a new constructortext.NewProgress()which is used throughout the program as a helper to abstract the logic which determines which progress should be used.