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

ctl: replace gc_safepoint call with PD HTTP SDK #8502

Closed
wants to merge 4 commits into from
Closed

ctl: replace gc_safepoint call with PD HTTP SDK #8502

wants to merge 4 commits into from

Conversation

JackL9u
Copy link
Contributor

@JackL9u JackL9u commented Aug 7, 2024

What problem does this PR solve?

Issue Number: Ref #7300

What is changed and how does it work?

1) changed the version of the package github.com/breeswish/gin-jwt/v2 from v2.6.4-jwt-patch to v2.6.5-0.20211112114546-24b7fddb24dc to successfully compile the project. 
2) replace gc_safepoint call with PD HTTP SDK

JackL9u and others added 4 commits August 7, 2024 15:11
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]>
Copy link
Contributor

ti-chi-bot bot commented Aug 7, 2024

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.

@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 7, 2024
Copy link
Contributor

ti-chi-bot bot commented Aug 7, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zhouqiang-cl for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

ti-chi-bot bot commented Aug 7, 2024

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@ti-chi-bot ti-chi-bot bot added needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 7, 2024
@@ -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"
Copy link
Member

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:

Suggested change
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) {
Copy link
Member

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.

Suggested change
func (c *client) GetGCSafePoint(ctx context.Context) (ListServiceGCSafepoint, error) {
// GetGCSafePoint ...
func (c *client) GetGCSafePoint(ctx context.Context) (ListServiceGCSafepoint, error) {

Copy link
Contributor Author

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) {
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

Comment on lines +85 to +86
// 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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

Copy link
Member

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.

Copy link
Contributor Author

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!

Copy link
Member

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.

@JackL9u JackL9u closed this by deleting the head repository Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants