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

checker: fix unhealth region skip the rule check #6427

Merged
merged 7 commits into from
May 10, 2023

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented May 10, 2023

What problem does this PR solve?

Issue Number: Close #6426

What is changed and how does it work?

allow the `schedule=deny` label can do rule constraints check

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 10, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bufferflies
  • 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 bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed labels May 10, 2023
@ti-chi-bot ti-chi-bot bot requested review from lhy1024 and rleungx May 10, 2023 03:50
@ti-chi-bot ti-chi-bot bot 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. and removed do-not-merge/needs-triage-completed labels May 10, 2023
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (490c7a8) 75.11% compared to head (9cccdda) 75.11%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6427   +/-   ##
=======================================
  Coverage   75.11%   75.11%           
=======================================
  Files         409      409           
  Lines       41484    41488    +4     
=======================================
+ Hits        31160    31165    +5     
- Misses       7630     7634    +4     
+ Partials     2694     2689    -5     
Flag Coverage Δ
unittests 75.11% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
pkg/schedule/operator_controller.go 86.51% <ø> (-1.29%) ⬇️
server/cluster/cluster.go 81.74% <ø> (+0.15%) ⬆️
pkg/schedule/checker/checker_controller.go 80.00% <100.00%> (+2.47%) ⬆️
pkg/schedule/metrics.go 100.00% <100.00%> (ø)
server/cluster/coordinator.go 72.81% <100.00%> (+0.41%) ⬆️

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

server/cluster/cluster.go Outdated Show resolved Hide resolved
@@ -424,14 +423,6 @@ func (oc *OperatorController) checkAddOperator(isPromoting bool, ops ...*operato
if op.SchedulerKind() == operator.OpAdmin || op.IsLeaveJointStateOperator() {
continue
}
if cl, ok := oc.cluster.(interface{ GetRegionLabeler() *labeler.RegionLabeler }); ok {
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 we need to use the way of pausing schedulers to prevent the range from being scheduled.

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 add the tests, prevent it in coordinator.

Signed-off-by: nolouch <[email protected]>
@ti-chi-bot ti-chi-bot bot added status/LGT1 Indicates that a PR has LGTM 1. labels May 10, 2023
Signed-off-by: nolouch <[email protected]>
@nolouch nolouch requested review from bufferflies and removed request for lhy1024 May 10, 2023 10:12
Signed-off-by: nolouch <[email protected]>
Signed-off-by: nolouch <[email protected]>
Copy link
Contributor

@bufferflies bufferflies left a comment

Choose a reason for hiding this comment

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

rest LGTM

@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 10, 2023
Signed-off-by: nolouch <[email protected]>
@nolouch
Copy link
Contributor Author

nolouch commented May 10, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 10, 2023

@nolouch: 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
Contributor

ti-chi-bot bot commented May 10, 2023

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

Commit hash: 1abc0e5

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label May 10, 2023
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request May 10, 2023
@ti-chi-bot
Copy link
Member

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

@nolouch nolouch deleted the fix-unhealth branch May 10, 2023 14:46
ti-chi-bot bot added a commit that referenced this pull request May 11, 2023
close #6426, ref #6427

allow the `schedule=deny` label can do rule constraints check

Signed-off-by: nolouch <[email protected]>

Co-authored-by: nolouch <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
nolouch added a commit to nolouch/pd that referenced this pull request May 15, 2023
close tikv#6426

allow the `schedule=deny` label can do rule constraints check

Signed-off-by: nolouch <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot added a commit that referenced this pull request May 25, 2023
close #6426, ref #6427

allow the `schedule=deny` label can do rule constraints check

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: nolouch <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: ShuNing <[email protected]>
Co-authored-by: nolouch <[email protected]>
Co-authored-by: Ryan Leung <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
@rleungx rleungx added the needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. label Feb 18, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Feb 18, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Feb 26, 2024
close #6426

allow the `schedule=deny` label can do rule constraints check

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: nolouch <[email protected]>

Co-authored-by: ShuNing <[email protected]>
Co-authored-by: nolouch <[email protected]>
AndreMouche added a commit to AndreMouche/pd that referenced this pull request Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. 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. 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.

Lightning block at not full replicaed
4 participants