Skip to content

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

Merged
Integralist merged 2 commits into
mainfrom
phamann/tty
Sep 15, 2021
Merged

Use a non-interactive progress writer in non-TTY environments#405
Integralist merged 2 commits into
mainfrom
phamann/tty

Conversation

@phamann

@phamann phamann commented Sep 15, 2021

Copy link
Copy Markdown

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 phamann requested a review from Integralist September 15, 2021 12:23
@phamann

phamann commented Sep 15, 2021

Copy link
Copy Markdown
Author

I've now fixed the failing tests 😄

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

@Integralist Integralist left a comment

Copy link
Copy Markdown
Member

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