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

Use a non-interactive progress writer in non-TTY environments #405

Merged
merged 2 commits into from
Sep 15, 2021

Conversation

phamann
Copy link
Member

@phamann phamann commented Sep 15, 2021

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.QuietProgress to text.InteractiveProgress, as it's not really "quiet", and then creates a new implementation of text.QuietProgress which only writes the step functions and not the intermediary writes to stdout. Lastly, we have a new constructor text.NewProgress() which is used throughout the program as a helper to abstract the logic which determines which progress should be used.

@phamann
Copy link
Member Author

phamann commented Sep 15, 2021

I've now fixed the failing tests 😄

@Integralist Integralist added the bug Something isn't working label Sep 15, 2021
Copy link
Collaborator

@Integralist Integralist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log output should be simplified when running in CI
2 participants