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

fix json output for check results #1720

Merged
merged 2 commits into from
Jan 12, 2022
Merged

Conversation

AstroProfundis
Copy link
Contributor

@AstroProfundis AstroProfundis commented Jan 11, 2022

What problem does this PR solve?

The output of check command in tup-cluster is a ASCII table, fix #1719

What is changed and how it works?

Make it a JSON string when --format=json is set

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

@AstroProfundis AstroProfundis added this to the v1.9.0 milestone Jan 11, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 11, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • srstack

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 submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@AstroProfundis AstroProfundis self-assigned this Jan 11, 2022
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 11, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2022

Codecov Report

Merging #1720 (ae92c46) into master (6fe71fe) will decrease coverage by 6.05%.
The diff coverage is 25.93%.

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

@@            Coverage Diff             @@
##           master    #1720      +/-   ##
==========================================
- Coverage   53.22%   47.17%   -6.05%     
==========================================
  Files         303      302       -1     
  Lines       34270    34480     +210     
==========================================
- Hits        18237    16263    -1974     
- Misses      13886    16099    +2213     
+ Partials     2147     2118      -29     
Flag Coverage Δ
dm 23.31% <0.00%> (-1.51%) ⬇️
unittest ?

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

Impacted Files Coverage Δ
pkg/cluster/manager/check.go 60.65% <25.93%> (-8.24%) ⬇️
pkg/utils/regexp.go 0.00% <0.00%> (-100.00%) ⬇️
components/dm/ansible/worker.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/meta/err.go 0.00% <0.00%> (-76.19%) ⬇️
pkg/cluster/api/error.go 0.00% <0.00%> (-75.00%) ⬇️
pkg/crypto/rand/passwd.go 0.00% <0.00%> (-75.00%) ⬇️
pkg/utils/semver.go 10.18% <0.00%> (-74.25%) ⬇️
pkg/telemetry/node_info.go 0.00% <0.00%> (-70.73%) ⬇️
pkg/utils/error.go 0.00% <0.00%> (-64.29%) ⬇️
components/dm/ansible/import.go 0.00% <0.00%> (-61.63%) ⬇️
... and 55 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 6fe71fe...2bd042e. Read the comment docs.

Copy link
Collaborator

@srstack srstack left a comment

Choose a reason for hiding this comment

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

LGTM

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

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 2bd042e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 12, 2022
@ti-chi-bot ti-chi-bot merged commit 467736d into pingcap:master Jan 12, 2022
@AstroProfundis AstroProfundis deleted the json-check branch January 12, 2022 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"tiup cluster check --format json" does not return valid json result
4 participants