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

tools: support triggering an event through HTTP API #5677

Merged
merged 6 commits into from
May 31, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Nov 3, 2022

Signed-off-by: Ryan Leung rleungx@gmail.com

What problem does this PR solve?

Issue Number: Ref #5468, close #5451.

What is changed and how does it work?

This PR supports the following functionality. And it can be reviewed until #5670 is merged.

  1. random down a store through curl <ip>:<status_port>/event\?event=down-node
  2. scale out a new store through curl <ip>:<status_port>/event\?event=add-node

Check List

Tests

  • Manual test

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 3, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HuSharp

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.

@rleungx rleungx requested review from nolouch and bufferflies and removed request for disksing and HunDunDM November 3, 2022 11:01
@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 77.33%. Comparing base (632cda4) to head (8b47279).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5677   +/-   ##
=======================================
  Coverage   77.32%   77.33%           
=======================================
  Files         470      471    +1     
  Lines       61340    61347    +7     
=======================================
+ Hits        47431    47441   +10     
- Misses      10331    10336    +5     
+ Partials     3578     3570    -8     
Flag Coverage Δ
unittests 77.33% <0.00%> (+<0.01%) ⬆️

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

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 15, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 23, 2022
Copy link

@lilinghai lilinghai left a comment

Choose a reason for hiding this comment

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

if we delete the delete/add nodes case , which case based we test this scenarios ?

tools/pd-simulator/simulator/event.go Show resolved Hide resolved

// IDAllocator is used to alloc unique ID.
var IDAllocator idAllocator

// CaseMap is a mapping of the cases to the their corresponding initialize functions.
var CaseMap = map[string]func() *Case{
"balance-leader": newBalanceLeader,
"redundant-balance-region": newRedundantBalanceRegion,

Choose a reason for hiding this comment

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

by the way ,why not balance region case registered?

@@ -36,7 +36,7 @@ func newRedundantBalanceRegion() *Case {

for i := 0; i < storeNum; i++ {

Choose a reason for hiding this comment

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

if we add/down-node the case checker should check all the stores balance , but it still use storeNum.
it may exists somewhere else.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 9, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2022
Copy link

@lilinghai lilinghai left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link
Member

@lilinghai: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

LGTM

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

@rleungx: PR needs rebase.

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.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 12, 2023
@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 30, 2024
@rleungx rleungx removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 30, 2024
@rleungx rleungx requested a review from HuSharp May 30, 2024 06:36
@rleungx rleungx closed this May 30, 2024
@rleungx rleungx reopened this May 30, 2024
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 31, 2024
@rleungx rleungx added the require-LGT1 Indicates that the PR requires an LGTM. label May 31, 2024
@rleungx
Copy link
Member Author

rleungx commented May 31, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented May 31, 2024

@rleungx: 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 31, 2024

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

Commit hash: 8b47279

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label May 31, 2024
@ti-chi-bot ti-chi-bot bot merged commit 19c9852 into tikv:master May 31, 2024
17 of 19 checks passed
@rleungx rleungx deleted the event branch May 31, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none require-LGT1 Indicates that the PR requires an LGTM. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make simulator more flexible
4 participants