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
check: refine CheckClusterVersion #2713
check: refine CheckClusterVersion #2713
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-integration-tests |
# Conflicts: # cmd/client.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reset LGTM.
Also, maybe we need to change the pr title since it will be used as the commit msg, but it looks like we are mostly modifying the version checking of the pd. |
/run-unit-tests |
…to refine_check_cluster_version
// See more: https://github.com/pingcap/pd/blob/v4.0.0-rc.1/server/api/version.go | ||
pdVer := struct { | ||
Version string `json:"version"` | ||
}{} | ||
|
||
httpClient, err := httputil.NewClient(credential) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to name it cli
, we know that it's an HTTP client by the right-hand side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cli is a very confusing acronym (first thought is command line interface), and it is not a recognized acronym for the client, it does not have a consensus acronym. So I prefer to change it to client to reduce confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 84d713a
|
Codecov Report
@@ Coverage Diff @@
## master #2713 +/- ##
================================================
+ Coverage 55.3406% 58.6665% +3.3258%
================================================
Files 164 180 +16
Lines 19754 18583 -1171
================================================
- Hits 10932 10902 -30
+ Misses 7790 6708 -1082
+ Partials 1032 973 -59 |
What problem does this PR solve?
make func
CheckClusterVersion
more intuitive to useWhat is changed and how it works?
Separate the logic of checking pd version into
CheckPDVersion
.Check List
Tests
Code changes
Side effects
Related changes
Release note