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

scheduler: fix flaky test TestRegionLabelDenyScheduler #8340

Merged
merged 5 commits into from
Jul 2, 2024

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Jun 27, 2024

What problem does this PR solve?

Issue Number: Close #8339

What is changed and how does it work?

Ignore the specified operator instead of skipping all operators

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

None.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 27, 2024
pkg/schedule/schedulers/grant_leader.go Outdated Show resolved Hide resolved
@@ -491,6 +491,8 @@ retry:
// If the evict-leader-scheduler is disabled, it will obstruct the restart operation of tikv by the operator.
// Refer: https://docs.pingcap.com/tidb-in-kubernetes/stable/restart-a-tidb-cluster#perform-a-graceful-restart-to-a-single-tikv-pod
if labelMgr.ScheduleDisabled(region) && !isEvictLeaderScheduler {
log.Debug("region is blocked by labeler", zap.Uint64("region-id", region.GetID()), zap.ByteString("start-key", region.GetStartKey()),
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to use logutil.ZapRedactByteString? cc @JmPotato

Copy link
Member

Choose a reason for hiding this comment

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

Yes, please use that to output the sensitive info like the user key.

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 27, 2024
@okJiang
Copy link
Member Author

okJiang commented Jun 27, 2024

/hold

This pull request does not need to be merged, the unstable test has been reproduced

#8339 (comment)

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 27, 2024
@okJiang
Copy link
Member Author

okJiang commented Jun 28, 2024

/test pull-integration-realcluster-test

1 similar comment
@okJiang
Copy link
Member Author

okJiang commented Jul 1, 2024

/test pull-integration-realcluster-test

Signed-off-by: okJiang <819421878@qq.com>
@okJiang okJiang changed the title scheduler: add some debug logs scheduler: fix flaky test TestRegionLabelDenyScheduler Jul 1, 2024
@okJiang
Copy link
Member Author

okJiang commented Jul 1, 2024

/test pull-integration-realcluster-test

@okJiang
Copy link
Member Author

okJiang commented Jul 1, 2024

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2024
@okJiang
Copy link
Member Author

okJiang commented Jul 1, 2024

/retest

Copy link
Member

@JmPotato JmPotato left a comment

Choose a reason for hiding this comment

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

This modification includes non-test changes. Do we need to add extra tests to verify it?

@okJiang
Copy link
Member Author

okJiang commented Jul 1, 2024

This modification includes non-test changes. Do we need to add extra tests to verify it?

This content is tested by TestRegionLabelDenyScheduler.

@okJiang
Copy link
Member Author

okJiang commented Jul 1, 2024

/test pull-integration-realcluster-test

Do not reproduce in local environment ref #8348

Copy link
Contributor

ti-chi-bot bot commented Jul 1, 2024

@okJiang: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build

The following commands are available to trigger optional jobs:

  • /test pull-integration-copr-test
  • /test pull-integration-realcluster-test

Use /test all to run the following jobs that were automatically triggered:

  • tikv/pd/ghpr_build
  • tikv/pd/pull_integration_realcluster_test

In response to this:

/test pull-integration-realcluster-test

Do not reproduce in local environment ref #8348

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.

@okJiang
Copy link
Member Author

okJiang commented Jul 1, 2024

/test pull-integration-realcluster-test

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 2, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 2, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, JmPotato

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 2, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 2, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-02 08:42:25.859345503 +0000 UTC m=+1313872.344834330: ☑️ agreed by JmPotato.
  • 2024-07-02 14:49:54.24132167 +0000 UTC m=+1335920.726810502: ☑️ agreed by HuSharp.

@ti-chi-bot ti-chi-bot bot merged commit a7f2632 into tikv:master Jul 2, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestRegionLabelDenyScheduler is flaky
3 participants