-
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
scheduler: skip evict-leader-scheduler when setting schedule deny label #8303
Conversation
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8303 +/- ##
==========================================
+ Coverage 77.30% 77.34% +0.03%
==========================================
Files 470 470
Lines 61500 61377 -123
==========================================
- Hits 47545 47469 -76
+ Misses 10393 10354 -39
+ Partials 3562 3554 -8
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: okJiang <819421878@qq.com>
/test ? |
@HuSharp: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
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. |
/test pull-integration-realcluster-test |
Signed-off-by: okJiang <819421878@qq.com>
/test pull-integration-realcluster-test |
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
"context" | ||
"os/exec" | ||
"testing" | ||
// func restartTiUP() { |
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.
How about using the build flag enable_flaky_tests
?
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'm not quite sure how enable_flaky_tests
works. I reverted the changes to this file first because the test is just not working, not because it's unstable. ad19424
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's not a flaky test, can be fixed by #8303 (comment)
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 fixed it. fa47700
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.
got
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
ci failed, Can you test this PR with lightning/br and paste a picture to indicate the change? |
I think realcluster test is enough for this pr😂 It's not really worth spending a lot of time making specific changes for this requirement to do e2e testing. It's completely sufficient to know that evict leader still works when calling the API. |
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.
Left some comments, rest LGTM!
@@ -4,14 +4,13 @@ | |||
// you may not use this file except in compliance with the License. | |||
// You may obtain a copy of the License at | |||
// | |||
// http://www.apache.org/licenses/LICENSE-2.0 | |||
// http://www.apache.org/licenses/LICENSE-2.0 |
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.
why change it?
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.
After adding comments and uncommenting it, the IDE automatically formatted it. If it will have any impact, I can revert it
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.
got
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.
2024-06-24.16.22.42.mov
Please let me keep it😭
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.
prefer to revert it
return true | ||
}, testutil.WithWaitFor(time.Minute)) | ||
|
||
re.NoError(pdHTTPCli.DeleteScheduler(ctx, schedulers.EvictLeaderName)) |
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 just mean
L143~L152
If the test exits in L143~L152
which means this test is failed, maybe all tests will be regarded as failed and then no need to delete the scheduler by defer function?
You can check the log in Jenkins, maybe it has some redundant delete?
https://do.pingcap.net/jenkins/blue/organizations/jenkins/tikv%2Fpd%2Fpull_integration_realcluster_test/detail/pull_integration_realcluster_test/98/pipeline/#step-77-log-200
> $CUR_PATH/playground.log 2>&1 & | ||
else | ||
# CI will download the binaries in the prepare phase. | ||
# ref https://github.com/PingCAP-QE/ci/blob/387e9e533b365174962ccb1959442a7070f9cd66/pipelines/tikv/pd/latest/pull_integration_realcluster_test.groovy#L55-L68 | ||
color-green "using existing binaries..." | ||
make pd-server WITH_RACE=1 |
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 remove this line, as the comment above explains that there is no need to make pd
:) may reduce test time
Signed-off-by: okJiang <819421878@qq.com>
server/cluster/cluster.go
Outdated
if len(newStore.GetLabels()) == 0 { | ||
return errors.Errorf("the label key %s does not exist", labelKey) | ||
} |
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.
Should we check it before cloning?
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.
Clone store before L1223(newStore.Labels = labels)?
@@ -4,14 +4,13 @@ | |||
// you may not use this file except in compliance with the License. | |||
// You may obtain a copy of the License at | |||
// | |||
// http://www.apache.org/licenses/LICENSE-2.0 | |||
// http://www.apache.org/licenses/LICENSE-2.0 |
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.
prefer to revert it
Signed-off-by: okJiang <819421878@qq.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HuSharp, rleungx 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 |
@rleungx @lance6716 Can you help me cp to 7.5 for testing? We can hold off on merging until we have a conclusion on whether to backport to v7.5.x and then merge. |
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: Close #7853 ref #7300
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs
/pingcap/docs-cn
:pingcap/tiup
:Release note