pingcap / tiup

A component manager for TiDB
https://tiup.io
Apache License 2.0
409 stars 304 forks source link

tiup & playground: Tidy output #2335

Closed breezewish closed 6 months ago

breezewish commented 6 months ago

What problem does this PR solve?

Make output more cleaner for tiup and playground.

What is changed and how it works?

Before:

image

After:

image image

Also introduced a new utility colorstr, which can be used to print colors easier.

Check List

Tests

Release notes:

NONE
codecov-commenter commented 6 months ago

Codecov Report

Attention: 59 lines in your changes are missing coverage. Please review.

Comparison is base (ced2d6d) 47.65% compared to head (0f1239d) 49.17%.

:exclamation: Current head 0f1239d differs from pull request most recent head 2885ac4. Consider uploading reports for the commit 2885ac4 to get more accurate results

Files Patch % Lines
pkg/exec/run.go 7.69% 36 Missing :warning:
components/playground/main.go 0.00% 11 Missing :warning:
pkg/tui/colorstr/color.go 69.23% 8 Missing :warning:
pkg/tui/colorstr/test_util.go 0.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2335 +/- ## ========================================== + Coverage 47.65% 49.17% +1.51% ========================================== Files 307 327 +20 Lines 33819 34812 +993 ========================================== + Hits 16116 17116 +1000 + Misses 15715 15447 -268 - Partials 1988 2249 +261 ``` | [Flag](https://app.codecov.io/gh/pingcap/tiup/pull/2335/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [cluster](https://app.codecov.io/gh/pingcap/tiup/pull/2335/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `43.19% <ø> (+1.25%)` | :arrow_up: | | [dm](https://app.codecov.io/gh/pingcap/tiup/pull/2335/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `25.44% <ø> (?)` | | | [playground](https://app.codecov.io/gh/pingcap/tiup/pull/2335/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `15.31% <23.26%> (?)` | | | [tiup](https://app.codecov.io/gh/pingcap/tiup/pull/2335/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `33.56% <36.00%> (+0.08%)` | :arrow_up: | | [unittest](https://app.codecov.io/gh/pingcap/tiup/pull/2335/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kaaaaaaang commented 6 months ago

/lgtm

ti-chi-bot[bot] commented 6 months ago

[LGTM Timeline notifier]

Timeline:

kaaaaaaang commented 6 months ago

/approve

ti-chi-bot[bot] commented 6 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaaaaaaang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/pingcap/tiup/blob/master/OWNERS)~~ [kaaaaaaang] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment