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

tests/operators: pause all checkers to make test stable #8166

Merged
merged 2 commits into from
May 13, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented May 11, 2024

What problem does this PR solve?

Issue Number: Ref #7969

What is changed and how does it work?

err := tu.CheckPostJSON(testDialClient, fmt.Sprintf("%s/operators", urlPrefix), []byte(`{"name":"merge-region", "source_region_id": 10, "target_region_id": 20}`), tu.StatusOK(re))
re.NoError(err)
err = tu.CheckPostJSON(testDialClient, fmt.Sprintf("%s/operators", urlPrefix), []byte(`{"name":"add-peer", "region_id": 30, "store_id": 4}`), tu.StatusOK(re))
re.NoError(err)

For example, when operators are to be tested in TestRemoveOperators will meet replace the old operators which is triggered by labeler-split-region and make test failed in

url := fmt.Sprintf("%s/operators", urlPrefix)
err = tu.CheckGetJSON(testDialClient, url, nil, tu.StatusOK(re), tu.StringContain(re, "merge: region 10 to 20"), tu.StringContain(re, "add peer: store [4]"))

[2024/05/11 15:58:38.823 +08:00] [INFO] [operator_controller.go:786] ["send schedule command"] [region-id=20] [step="merge region 10 into region 20"] [source=create]
[2024/05/11 15:58:38.829 +08:00] [INFO] [operator_controller.go:510] ["add operator"] [region-id=30] [operator="\"admin-add-peer {add peer: store [4]} (kind:admin,region, region:30(2, 3), createAt:2024-05-11 15:58:38.828966736 +0800 CST m=+20.568753104, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, size:1, steps:[0:{add learner peer 5 on store 4}, 1:{promote learner peer 5 on store 4 to voter}], timeout:[11m0s])\""] [additional-info=]
[2024/05/11 15:58:38.830 +08:00] [INFO] [operator_controller.go:705] ["replace old operator"] [region-id=30] [takes=129.326768ms] [operator="\"labeler-split-region {split: region 30 use policy USEKEY and keys [7200000000000000FB 7200000100000000FB 7800000000000000FB 7800000100000000FB]} (kind:split, region:30(2, 3), createAt:2024-05-11 15:58:38.699935018 +0800 CST m=+20.439721392, startAt:2024-05-11 15:58:38.701135093 +0800 CST m=+20.440921467, currentStep:0, size:1, steps:[0:{split region with policy USEKEY}], timeout:[1m0s])\""] [additional-info="{\"region-end-key\":\"\",\"region-start-key\":\"63\"}"]
[2024/05/11 15:58:38.830 +08:00] [INFO] [operator_controller.go:510] ["add operator"] [region-id=30] [operator="\"labeler-split-region {split: region 30 use policy USEKEY and keys [7200000000000000FB 7200000100000000FB 7800000000000000FB 7800000100000000FB]} (kind:split, region:30(2, 3), createAt:2024-05-11 15:58:38.830271352 +0800 CST m=+20.570057726, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, size:1, steps:[0:{split region with policy USEKEY}], timeout:[1m0s])\""] [additional-info="{\"region-end-key\":\"\",\"region-start-key\":\"63\"}"]
[2024/05/11 15:58:38.831 +08:00] [INFO] [operator_controller.go:786] ["send schedule command"] [region-id=30] [step="add learner peer 5 on store 4"] [source=create]
[2024/05/11 15:58:38.832 +08:00] [INFO] [operator_controller.go:705] ["replace old operator"] [region-id=30] [takes=1.313443ms] [operator="\"admin-add-peer {add peer: store [4]} (kind:admin,region, region:30(2, 3), createAt:2024-05-11 15:58:38.828966736 +0800 CST m=+20.568753104, startAt:2024-05-11 15:58:38.831088504 +0800 CST m=+20.570874872, currentStep:0, size:1, steps:[0:{add learner peer 5 on store 4}, 1:{promote learner peer 5 on store 4 to voter}], timeout:[11m0s])\""] [additional-info=]

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: husharp <[email protected]>
@HuSharp HuSharp requested review from lhy1024 and rleungx May 11, 2024 08:45
Copy link
Contributor

ti-chi-bot bot commented May 11, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nolouch
  • 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 11, 2024
Copy link

codecov bot commented May 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.37%. Comparing base (2278609) to head (86e3033).

❗ Current head 86e3033 differs from pull request most recent head d4070b1. Consider uploading reports for the commit d4070b1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8166      +/-   ##
==========================================
+ Coverage   77.34%   77.37%   +0.02%     
==========================================
  Files         471      471              
  Lines       61367    61353      -14     
==========================================
+ Hits        47464    47470       +6     
+ Misses      10331    10307      -24     
- Partials     3572     3576       +4     
Flag Coverage Δ
unittests 77.37% <ø> (+0.02%) ⬆️

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

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 13, 2024
@HuSharp HuSharp changed the title tests/operators: pause all check to make test stable tests/operators: pause all checkers to make test stable May 13, 2024
@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 13, 2024
@HuSharp
Copy link
Member Author

HuSharp commented May 13, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented May 13, 2024

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

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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.

Copy link
Contributor

ti-chi-bot bot commented May 13, 2024

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

Commit hash: 86e3033

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

ti-chi-bot bot commented May 13, 2024

@HuSharp: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 5f8c38b into tikv:master May 13, 2024
22 checks passed
@HuSharp HuSharp deleted the make_operators_test_stable branch May 13, 2024 06:56
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. 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.

3 participants