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

config: make original HTTP API compatible with config manager #2080

Merged
merged 8 commits into from
Feb 5, 2020

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jan 6, 2020

What problem does this PR solve?

Part of #1977. It should be reviewed after #2049 is merged.

What is changed and how it works?

This PR makes the original config API support config manager.

Check List

Tests

  • Unit test

@rleungx rleungx added the component/config Configuration logic. label Jan 6, 2020
@rleungx rleungx added this to the v4.0.0-beta milestone Jan 6, 2020
@codecov-io
Copy link

codecov-io commented Jan 6, 2020

Codecov Report

Merging #2080 into master will decrease coverage by 0.03%.
The diff coverage is 81.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2080      +/-   ##
==========================================
- Coverage    76.7%   76.67%   -0.04%     
==========================================
  Files         194      194              
  Lines       20003    20036      +33     
==========================================
+ Hits        15344    15363      +19     
- Misses       3503     3511       +8     
- Partials     1156     1162       +6
Impacted Files Coverage Δ
server/schedulers/balance_leader.go 91.33% <100%> (+0.48%) ⬆️
server/schedulers/balance_region.go 85.15% <100%> (+0.6%) ⬆️
server/schedule/placement/rule.go 94.28% <100%> (+0.34%) ⬆️
pkg/mock/mockcluster/mockcluster.go 90.19% <100%> (+0.29%) ⬆️
server/schedule/placement/rule_manager.go 86.45% <50%> (-2.44%) ⬇️
server/core/storage.go 72.86% <73.68%> (+0.46%) ⬆️
server/schedulers/shuffle_region.go 72.85% <0%> (-11.43%) ⬇️
server/schedulers/base_scheduler.go 60.86% <0%> (-8.7%) ⬇️
server/tso/tso.go 77.37% <0%> (-2.92%) ⬇️
server/region_syncer/client.go 79.31% <0%> (-1.73%) ⬇️
... and 11 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 f569314...56e4955. Read the comment docs.

@rleungx rleungx removed this from the v4.0.0-beta milestone Jan 9, 2020
@rleungx rleungx changed the title config: support from HTTP API to gRPC gateway for config API config: make original HTTP API compatible with config manager Jan 19, 2020
@rleungx
Copy link
Member Author

rleungx commented Jan 19, 2020

/run-all-tests

1 similar comment
@rleungx
Copy link
Member Author

rleungx commented Jan 19, 2020

/run-all-tests

Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

Rest LGTM

case nil:
default:
// TODO: support more types
v = updateItem
Copy link
Member

Choose a reason for hiding this comment

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

How about returning an error? I think we should be strict about unknown types in case of unexpected errors.

@rleungx
Copy link
Member Author

rleungx commented Feb 3, 2020

/run-all-tests

Signed-off-by: Ryan Leung <[email protected]>
Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

LGTM

@overvenus overvenus added the status/can-merge Indicates a PR has been approved by a committer. label Feb 5, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Feb 5, 2020

/run-all-tests

@sre-bot sre-bot merged commit 5169308 into tikv:master Feb 5, 2020
@rleungx rleungx added this to the v4.0.0-beta.1 milestone Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config Configuration logic. status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants