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

cluster: allow type change when editing topology #1050

Merged
merged 3 commits into from
Jan 12, 2021

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

Allowing value type change for edit-config. Especially useful when editing configs.

What is changed and how it works?

The latest version of r3labs/diff has an option to ignore type mismatch error, so we upgrade the dependency and enable that option.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
    (Change tikv_servers.(server).config.key: 10 to tikv_servers.(server).config.key: "10MB")
    Before:
    image

After:
Save as normal.

Release notes:

cluster: allow value type change in `edit-config`

@AstroProfundis AstroProfundis added type/enhancement Categorizes issue or PR as related to an enhancement. category/usability Categorizes issue or PR as a usability enhancement. labels Jan 8, 2021
@AstroProfundis AstroProfundis added this to the v1.4.0 milestone Jan 8, 2021
@AstroProfundis AstroProfundis self-assigned this Jan 8, 2021
@ti-chi-bot ti-chi-bot requested a review from july2993 January 8, 2021 09:44
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 8, 2021
@codecov-io
Copy link

codecov-io commented Jan 8, 2021

Codecov Report

Merging #1050 (a7e11ec) into master (a246cfa) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1050      +/-   ##
==========================================
+ Coverage   55.86%   55.95%   +0.09%     
==========================================
  Files         282      282              
  Lines       19868    19869       +1     
==========================================
+ Hits        11099    11118      +19     
+ Misses       7040     7029      -11     
+ Partials     1729     1722       -7     
Flag Coverage Δ
cluster 44.03% <100.00%> (+0.10%) ⬆️
dm 24.01% <100.00%> (+0.06%) ⬆️
integrate 50.25% <100.00%> (+0.09%) ⬆️
playground 20.30% <0.00%> (-0.01%) ⬇️
tiup 16.47% <0.00%> (-0.01%) ⬇️
unittest 22.28% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
pkg/utils/diff.go 87.50% <100.00%> (+0.15%) ⬆️
pkg/cluster/spec/pd.go 68.78% <0.00%> (+1.27%) ⬆️
pkg/cluster/manager/display.go 84.25% <0.00%> (+1.57%) ⬆️
pkg/cluster/api/dmapi.go 60.00% <0.00%> (+1.73%) ⬆️
pkg/cluster/api/pdapi.go 60.56% <0.00%> (+1.89%) ⬆️
pkg/cluster/template/scripts/pd.go 71.87% <0.00%> (+3.12%) ⬆️
pkg/cluster/spec/util.go 86.04% <0.00%> (+4.65%) ⬆️
pkg/utils/http_client.go 72.97% <0.00%> (+5.40%) ⬆️

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 a246cfa...a7e11ec. Read the comment docs.

@lucklove
Copy link
Member

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 12, 2021
@lucklove
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: dec4375

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

@AstroProfundis: Your PR has out-of-dated, I have automatically updated it for you.

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/ti-community-prow repository.

@ti-chi-bot ti-chi-bot merged commit 9caaca7 into pingcap:master Jan 12, 2021
@AstroProfundis AstroProfundis deleted the update-diff branch January 19, 2021 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/usability Categorizes issue or PR as a usability enhancement. 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/LGT1 Indicates that a PR has LGTM 1. type/enhancement Categorizes issue or PR as related to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants