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

tidb status add gethealth info #4844

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mikechengwei
Copy link
Contributor

What problem does this PR solve?

Close #4772 .

What is changed and how does it work?

When tidb sync status info, not ignoring error, and adding message field to sync error detail info.

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.


@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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.

@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2023

Codecov Report

Merging #4844 (5566df9) into master (ce44c90) will increase coverage by 5.38%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4844      +/-   ##
==========================================
+ Coverage   59.39%   64.77%   +5.38%     
==========================================
  Files         226      230       +4     
  Lines       25622    28698    +3076     
==========================================
+ Hits        15218    18590    +3372     
+ Misses       8957     8581     -376     
- Partials     1447     1527      +80     
Flag Coverage Δ
e2e 42.40% <0.00%> (?)
unittest 59.39% <0.00%> (+<0.01%) ⬆️

Copy link
Contributor

@july2993 july2993 left a comment

Choose a reason for hiding this comment

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

It is ok to return err in syncTidbClusterStatus
the issue is GetHealth() DO NOT return the error and also DO NOT log the error when getBodyOk return the error(so we lost this error), so if something makes it keep failing to request the status API, we do not know what happens.

The original issue is /status keeps blocking(caused by some bug of the pd version), not returning a response. I can not see any log or other thinks about this, and I need to kubectl exec .. into the pod the request the status API to make sure that this keeps not health in the tc status.

@mikechengwei
Copy link
Contributor Author

It is ok to return err in syncTidbClusterStatus the issue is GetHealth() DO NOT return the error and also DO NOT log the error when getBodyOk return the error(so we lost this error), so if something makes it keep failing to request the status API, we do not know what happens.

The original issue is /status keeps blocking(caused by some bug of the pd version), not returning a response. I can not see any log or other thinks about this, and I need to kubectl exec .. into the pod the request the status API to make sure that this keeps not health in the tc status.

Ok, I modified the code from your perspective.
Ref:

return err == nil, err

original code is:

return err == nil, nil

@mikechengwei
Copy link
Contributor Author

/run-all-tests

1 similar comment
@mikechengwei
Copy link
Contributor Author

/run-all-tests

newTidbMember := v1alpha1.TiDBMember{
Name: name,
Health: health,
}
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

do we need to keep the err in _, err = getBodyOK(httpClient, url)?

Copy link
Member

Choose a reason for hiding this comment

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

why do you revert it in a637f81

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 20, 2023

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

do not lost the error when checking tidb health
5 participants