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

Send 'Staring component...' output to stderr #1298

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Apr 9, 2021

What is changed and how it works?

Some components output JSON or YAML. When the "Starting component..." message is mixed with this
the output needs to be cleaned up before it can be used.

Examples of this are:

tiup ctl:v5.0.0 tidb --host 192.168.122.50 schema in mysql | jq
tiup cluster template > template.yaml

This commit changes the output o the "Starting component..." to be send to stderr instead.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Run the command with > /dev/null, you should now only see the Starting component... line.

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

@ti-chi-bot ti-chi-bot requested a review from july2993 April 9, 2021 10:02
@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 9, 2021
@codecov-io
Copy link

Codecov Report

Merging #1298 (c566ca6) into master (85c8c43) will increase coverage by 27.47%.
The diff coverage is 100.00%.

❗ Current head c566ca6 differs from pull request most recent head 28c54c4. Consider uploading reports for the commit 28c54c4 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1298       +/-   ##
===========================================
+ Coverage   26.18%   53.66%   +27.47%     
===========================================
  Files         263      289       +26     
  Lines       18917    20784     +1867     
===========================================
+ Hits         4954    11153     +6199     
+ Misses      13195     7833     -5362     
- Partials      768     1798     +1030     
Flag Coverage Δ
cluster 38.38% <ø> (?)
dm 26.54% <ø> (?)
integrate 47.56% <100.00%> (+31.20%) ⬆️
playground 24.17% <0.00%> (?)
tiup 16.35% <100.00%> (ø)
unittest 22.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/exec/run.go 57.89% <100.00%> (+1.97%) ⬆️
pkg/cluster/operation/download.go 36.84% <0.00%> (ø)
components/playground/instance/pump.go 0.00% <0.00%> (ø)
pkg/cluster/flags/debug.go 100.00% <0.00%> (ø)
pkg/cluster/operation/scale_in.go 0.00% <0.00%> (ø)
pkg/cluster/operation/destroy.go 45.76% <0.00%> (ø)
components/playground/instance/tikv.go 67.34% <0.00%> (ø)
pkg/cluster/operation/systemd.go 70.00% <0.00%> (ø)
components/playground/instance/tiflash_config.go 100.00% <0.00%> (ø)
pkg/logger/logger.go 100.00% <0.00%> (ø)
... and 201 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85c8c43...28c54c4. Read the comment docs.

@lucklove
Copy link
Member

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 12, 2021
@lucklove
Copy link
Member

/lgtm cancel

@ti-chi-bot ti-chi-bot removed the status/LGT1 Indicates that a PR has LGTM 1. label Apr 12, 2021
@AstroProfundis AstroProfundis added category/usability Categorizes issue or PR as a usability enhancement. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. type/bug-fix Categorizes PR as a bug-fix labels Apr 12, 2021
@AstroProfundis AstroProfundis added this to the v1.4.2 milestone Apr 12, 2021
@lucklove
Copy link
Member

Could you please fix this too?

When the cluster/dm is not the newest, it will print this to stdout:

屏幕快照 2021-04-12 上午11 32 49

Which will cause problem too.

…up with component output

Some components output JSON or YAML. When the "Starting component..." message is mixed with this
the output needs to be cleaned up before it can be used.

Examples of this are:

```
tiup ctl:v5.0.0 tidb --host 192.168.122.50 schema in mysql | jq
```

```
tiup cluster template > template.yaml
```

This commit changes the output o the "Starting component..." to be send to stderr instead.
@dveeden dveeden force-pushed the starting_component_stderr branch from 28c54c4 to ae43251 Compare April 12, 2021 05:47
@dveeden
Copy link
Contributor Author

dveeden commented Apr 12, 2021

@lucklove that should be fixed as well now

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AstroProfundis

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 12, 2021
@AstroProfundis
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: ae43251

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 12, 2021
@ti-chi-bot ti-chi-bot merged commit f3f35be into pingcap:master Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/usability Categorizes issue or PR as a usability enhancement. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/bug-fix Categorizes PR as a bug-fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants