Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Add getSpinner method to $progressIndicator #1040

Merged
merged 2 commits into from
Jan 23, 2018

Conversation

rosen-vladimirov
Copy link
Collaborator

@rosen-vladimirov rosen-vladimirov commented Jan 11, 2018

Add getSpinner method to $progressIndicator - it will return a new instance of clui.Spinner in case terminal is interactive. In case it is not - a mocked instance will be returned.
This way in CI builds the spinner will not print tons of repeated messages.

} else {
let msg = message;
return {
start: () => this.$logger.info(msg),
Copy link
Contributor

Choose a reason for hiding this comment

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

For cloud builds this will print for example Installing tns-android and we are going to loose the broken "progress indicator" which we currently have. Without it our users may wonder is the build slow or is there some other problem (network connectivity issue on their side, or some bug on our side).
Do you think it will be better to have some kind of progress indicator instead of just one message?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we shouldn't rely on the cloud build logs in order to show progress indication on the client side. IMO this should be handled on the client side in any other meaningful way.
@tsvetie what do you think?

Add `getSpinner` method to $progressIndicator - it will return a new instance of clui.Spinner in case terminal is interactive. In case it is not - a mocked instance will be returned.
This way in CI builds the spinner will not print tons of repeated messages.
Currently all http request can be piped in httpClient, which is uses when we want to download some file. Each of these pipes is passed through progressStream, so we can print some indication on the same line that something happens.
We do not want this in CI environment. Also it is strange to print message like "Download completed" in the middle of any operation.
So remove the progress indicator (in fact the percentage part of it has been broken for a while). Extract the method in helpers in case we need it in the future.
@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/disable-spinners-in-ci branch from 4dc9e0c to 93db157 Compare January 23, 2018 13:25
Copy link
Contributor

@Mitko-Kerezov Mitko-Kerezov left a comment

Choose a reason for hiding this comment

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

Looks okay to me

@rosen-vladimirov rosen-vladimirov merged commit 7b6baed into release Jan 23, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/disable-spinners-in-ci branch January 23, 2018 15:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants