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

labeler: add index to support rule override #4032

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

disksing
Copy link
Contributor

Signed-off-by: disksing i@disksing.com

What problem does this PR solve?

Fix #4031

What is changed and how it works?

Add Index field to RegionLabelRule. When multiple rules defines label with the same key, only the one with the maximum index takes effect. When there are multiple rules have an index equal to maximum value, the returned value is undefined behavior.

Check List

Tests

  • Unit test

Release note

None

Signed-off-by: disksing <i@disksing.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 26, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • rleungx

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.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Aug 26, 2021
@codecov
Copy link

codecov bot commented Aug 26, 2021

Codecov Report

Merging #4032 (704d338) into master (692e003) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4032      +/-   ##
==========================================
- Coverage   74.58%   74.54%   -0.04%     
==========================================
  Files         256      256              
  Lines       25866    25877      +11     
==========================================
- Hits        19293    19291       -2     
- Misses       4859     4869      +10     
- Partials     1714     1717       +3     
Flag Coverage Δ
unittests 74.54% <100.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
server/schedule/labeler/labeler.go 79.41% <100.00%> (+1.81%) ⬆️
server/kv/etcd_kv.go 72.46% <0.00%> (-7.25%) ⬇️
server/schedule/operator/step.go 67.44% <0.00%> (-2.33%) ⬇️
server/server.go 70.51% <0.00%> (-1.07%) ⬇️
server/cluster/coordinator.go 72.07% <0.00%> (-0.91%) ⬇️
server/schedule/operator_controller.go 84.75% <0.00%> (-0.80%) ⬇️
server/cluster/cluster.go 82.22% <0.00%> (-0.36%) ⬇️
server/tso/tso.go 65.19% <0.00%> (ø)
server/grpc_service.go 47.45% <0.00%> (+0.22%) ⬆️
server/member/member.go 65.24% <0.00%> (+0.53%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 692e003...704d338. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 26, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 26, 2021
@JmPotato
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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

This pull request has been accepted and is ready to merge.

Commit hash: 704d338

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 26, 2021
@ti-chi-bot ti-chi-bot merged commit c5b3f4f into tikv:master Aug 26, 2021
@disksing disksing deleted the region-label-index branch August 26, 2021 06:27
v01dstar pushed a commit to v01dstar/pd that referenced this pull request Oct 28, 2021
Signed-off-by: disksing <i@disksing.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Region Label Rule override
4 participants