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

server/api: add an API to configure failpoints in runtime (#3488) #3809

Merged
merged 3 commits into from
Jul 6, 2021

Conversation

sticnarf
Copy link
Contributor

@sticnarf sticnarf commented Jun 23, 2021

What is changed and how it works?

Cherry pick #3488. Some integration tests depend on setting failpoints at runtime. We need this feature on release-4.0 to do integrations tests for 4.0.x.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

First set GO_FAILPOINTS="github.com/tikv/pd/server/api/enableFailpointAPI=return" environment variable to enable this API.

Then, we can run HTTP requests like this to set failpoints:

curl -X PUT -d "return" http://{PD_ADDR}:2379/pd/api/v1/fail/github.com/tikv/pd/server/tso/systemTimeSlow

And we can also get the enabled failpoint list:

❯ curl http://{PD_ADDR}:2379/pd/api/v1/fail/
github.com/tikv/pd/server/api/enableFailpointAPI=return
github.com/tikv/pd/server/tso/systemTimeSlow=return

Code changes

  • Has HTTP API interfaces change

Release note

NONE

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
@ti-chi-bot ti-chi-bot added do-not-merge/cherry-pick-not-approved do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 23, 2021
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 23, 2021
@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #3809 (fab0dd9) into release-4.0 (85a49d5) will decrease coverage by 2.50%.
The diff coverage is 69.15%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-4.0    #3809      +/-   ##
===============================================
- Coverage        77.16%   74.66%   -2.51%     
===============================================
  Files              204      211       +7     
  Lines            21940    19940    -2000     
===============================================
- Hits             16931    14888    -2043     
+ Misses            3724     3715       -9     
- Partials          1285     1337      +52     
Flag Coverage Δ
unittests 74.66% <69.15%> (?)

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

Impacted Files Coverage Δ
client/metrics.go 100.00% <ø> (ø)
pkg/apiutil/apiutil.go 61.90% <ø> (-5.45%) ⬇️
pkg/cache/cache.go 0.00% <ø> (ø)
pkg/cache/fifo.go 100.00% <ø> (ø)
pkg/cache/lru.go 76.74% <ø> (-3.62%) ⬇️
pkg/cache/two_queue.go 61.11% <ø> (-5.56%) ⬇️
pkg/codec/codec.go 77.46% <ø> (-1.11%) ⬇️
pkg/component/manager.go 77.94% <ø> (-3.08%) ⬇️
pkg/dashboard/adapter/redirector.go 93.33% <ø> (-0.90%) ⬇️
pkg/dashboard/keyvisual/input/core.go 33.33% <ø> (ø)
... and 372 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b82288...fab0dd9. Read the comment docs.

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nolouch

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 added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 29, 2021
@nolouch nolouch added the type/cherry-pick-for-release-4.0 The PR belongs to release-4.0 cherry pick. label Jul 5, 2021
@zhouqiang-cl zhouqiang-cl added backport-4.0.14 cherry-pick-approved Cherry pick PR approved by release team. labels Jul 6, 2021
@nolouch nolouch added the require-LGT1 Indicates that the PR requires an LGTM. label Jul 6, 2021
@nolouch
Copy link
Contributor

nolouch commented Jul 6, 2021

/merge

@ti-chi-bot
Copy link
Member

@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
Member

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

Commit hash: 1af22a4

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

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

At the same time I will also trigger all tests for you:

/run-all-tests

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.

1 similar comment
@ti-chi-bot
Copy link
Member

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

At the same time I will also trigger all tests for you:

/run-all-tests

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 merged commit 4a50ce9 into tikv:release-4.0 Jul 6, 2021
@HunDunDM HunDunDM added this to the v4.0.14 milestone Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. release-note-none Denotes a PR that doesn't merit a release note. require-LGT1 Indicates that the PR requires an LGTM. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/cherry-pick-for-release-4.0 The PR belongs to release-4.0 cherry pick.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants