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

server: store the updated labels into etcd #51451

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

you06
Copy link
Contributor

@you06 you06 commented Mar 1, 2024

What problem does this PR solve?

Issue Number: close #51427

Problem Summary:

What changed and how does it work?

Update the latest labels to etcd when label api is called.

Check List

Tests

  • Unit test
  • [] Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Ran the case described in the issue now got:

~ » curl 127.0.0.1:10080/info/all
{
...
   "labels": {},
...
}%
----------------------------------------------------------------------------------
~ » curl -X POST -d "{\"foo\": \"bar\"}" 127.0.0.1:10080/labels
{
 "foo": "bar"
}%
----------------------------------------------------------------------------------
~ » curl 127.0.0.1:10080/info/all
{
...
   "labels": {
    "foo": "bar"
   },
...
 }
}%
----------------------------------------------------------------------------------
~ » curl -X POST -d "{\"foo\": \"tidb\"}" 127.0.0.1:10080/labels                                                                                                                                                                                               you06@you06s-MBP
{
 "foo": "tidb"
}%
----------------------------------------------------------------------------------
~ » curl 127.0.0.1:10080/info/all
{
...
   "labels": {
    "foo": "tidb"
   },
...
}%

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 1, 2024
Copy link

tiprow bot commented Mar 1, 2024

Hi @you06. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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.

@you06
Copy link
Contributor Author

you06 commented Mar 1, 2024

/run-check-issue-triage-complete

Signed-off-by: you06 <you1474600@gmail.com>
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Merging #51451 (7acdc32) into master (718c7a3) will increase coverage by 2.0848%.
Report is 12 commits behind head on master.
The diff coverage is 57.1428%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51451        +/-   ##
================================================
+ Coverage   70.7479%   72.8327%   +2.0848%     
================================================
  Files          1462       1462                
  Lines        435179     435907       +728     
================================================
+ Hits         307880     317483      +9603     
+ Misses       108058      98495      -9563     
- Partials      19241      19929       +688     
Flag Coverage Δ
integration 49.0555% <0.0000%> (?)
unit 70.5048% <57.1428%> (-0.0477%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.5588% <ø> (+5.6783%) ⬆️

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 1, 2024
@you06
Copy link
Contributor Author

you06 commented Mar 1, 2024

@glorv PTAL

@you06 you06 requested a review from glorv March 1, 2024 08:56
@you06
Copy link
Contributor Author

you06 commented Mar 1, 2024

/retest

Copy link

tiprow bot commented Mar 1, 2024

@you06: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@glorv
Copy link
Contributor

glorv commented Mar 1, 2024

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Mar 1, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 1, 2024
Copy link

ti-chi-bot bot commented Mar 1, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-01 08:29:43.174803066 +0000 UTC m=+1209871.922426177: ☑️ agreed by lcwangchao.
  • 2024-03-01 10:02:13.177506595 +0000 UTC m=+1215421.925129703: ☑️ agreed by glorv.

@you06
Copy link
Contributor Author

you06 commented Mar 1, 2024

/merge

Copy link

ti-chi-bot bot commented Mar 1, 2024

@you06: We have migrated to builtin LGTM and approve plugins for reviewing.

Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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 ti-community-infra/tichi repository.

@you06
Copy link
Contributor Author

you06 commented Mar 1, 2024

/approve

Copy link

ti-chi-bot bot commented Mar 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, hawkingrei, lcwangchao, you06, zimulala

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@ti-chi-bot ti-chi-bot bot added the approved label Mar 4, 2024
@you06
Copy link
Contributor Author

you06 commented Mar 4, 2024

/merge

Copy link

ti-chi-bot bot commented Mar 4, 2024

@you06: We have migrated to builtin LGTM and approve plugins for reviewing.

Please use /approve when you want approve this pull request.

The changes announcement: LGTM plugin changes

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit 7b55841 into pingcap:master Mar 4, 2024
23 checks passed
@you06
Copy link
Contributor Author

you06 commented Mar 7, 2024

/cherry-pick release-7.1

@you06
Copy link
Contributor Author

you06 commented Mar 7, 2024

/cherry-pick release-7.5

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 7, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

@you06: new pull request created to branch release-7.1: #51564.

In response to this:

/cherry-pick release-7.1

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 7, 2024
@ti-chi-bot
Copy link
Member

@you06: new pull request created to branch release-7.5: #51565.

In response to this:

/cherry-pick release-7.5

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 ti-community-infra/tichi repository.

@you06 you06 added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. labels Mar 7, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.5 from head ti-chi-bot:cherry-pick-51451-to-release-7.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-51451-to-release-7.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 7, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.1 from head ti-chi-bot:cherry-pick-51451-to-release-7.1: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-51451-to-release-7.1."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 7, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 7, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #51566.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. 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.

update labels API not work for some modules
6 participants