-
Notifications
You must be signed in to change notification settings - Fork 720
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
ctl: replace gc_safepoint call with PD HTTP SDK #8502
Conversation
Signed-off-by: Boyang Lyu <[email protected]>
ref #7969, ref #8475 Signed-off-by: husharp <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> Signed-off-by: Boyang Lyu <[email protected]>
Signed-off-by: Boyang Lyu <[email protected]>
Signed-off-by: Boyang Lyu <[email protected]>
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @JackL9u. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@@ -79,6 +79,7 @@ const ( | |||
Status = "/pd/api/v1/status" | |||
Version = "/pd/api/v1/version" | |||
operators = "/pd/api/v1/operators" | |||
safepoint = "pd/api/v1/gc/safepoint" |
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.
Please align with other definitions:
safepoint = "pd/api/v1/gc/safepoint" | |
safepoint = "/pd/api/v1/gc/safepoint" |
@@ -1024,3 +1026,29 @@ func (c *client) GetKeyspaceMetaByName(ctx context.Context, keyspaceName string) | |||
} | |||
return &keyspaceMetaPB, nil | |||
} | |||
|
|||
func (c *client) GetGCSafePoint(ctx context.Context) (ListServiceGCSafepoint, error) { |
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.
Each exported function should contain a line of comments.
func (c *client) GetGCSafePoint(ctx context.Context) (ListServiceGCSafepoint, error) { | |
// GetGCSafePoint ... | |
func (c *client) GetGCSafePoint(ctx context.Context) (ListServiceGCSafepoint, error) { |
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.
will do!
return gcsafepoint, nil | ||
} | ||
|
||
func (c *client) DeleteGCSafePoint(ctx context.Context, service_id string) (string, error) { |
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.
Ditto.
// github.com/breeswish/gin-jwt/v2 v2.6.4-jwt-patch // indirect | ||
github.com/breeswish/gin-jwt/v2 v2.6.5-0.20211112114546-24b7fddb24dc // indirect |
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.
Usually, an indirect dependency should not be modified manually. Why change it?
@@ -54,7 +54,8 @@ require ( | |||
github.com/aws/smithy-go v1.13.5 // indirect | |||
github.com/beorn7/perks v1.0.1 // indirect | |||
github.com/bitly/go-simplejson v0.5.0 // indirect | |||
github.com/breeswish/gin-jwt/v2 v2.6.4-jwt-patch // indirect | |||
// github.com/breeswish/gin-jwt/v2 v2.6.4-jwt-patch // indirect | |||
github.com/breeswish/gin-jwt/v2 v2.6.5-0.20211112114546-24b7fddb24dc // indirect |
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.
Ditto.
@@ -64,7 +64,8 @@ require ( | |||
github.com/aws/smithy-go v1.13.5 // indirect | |||
github.com/beorn7/perks v1.0.1 // indirect | |||
github.com/bitly/go-simplejson v0.5.0 // indirect | |||
github.com/breeswish/gin-jwt/v2 v2.6.4-jwt-patch // indirect | |||
// github.com/breeswish/gin-jwt/v2 v2.6.4-jwt-patch // indirect | |||
github.com/breeswish/gin-jwt/v2 v2.6.5-0.20211112114546-24b7fddb24dc // indirect |
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.
Ditto.
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.
It is best not to introduce unrelated changes in a PR with a clear purpose. You can open another PR to make these modifications.
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 see, those files were added because I merged changes from upstream/master while working in the dev branch. Will pay attention in the future!
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.
It seems like you don't merge the upstream changes correctly, which makes them become part of "your" changes. It is recommended to do this by rebasing.
What problem does this PR solve?
Issue Number: Ref #7300
What is changed and how does it work?