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 continue editing when new topology has errors #624

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

In edit-config, if the new topology fails parsing or validation, it just returns error and exists, changes are not saved and lost.

What is changed and how it works?

Prompt the user to choose to continue editing or not.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Code changes

  • Has exported function/method change

@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 Jul 23, 2020
@AstroProfundis AstroProfundis self-assigned this Jul 23, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2020

Codecov Report

Merging #624 into master will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #624      +/-   ##
==========================================
+ Coverage   47.78%   47.90%   +0.11%     
==========================================
  Files         225      225              
  Lines       16728    16747      +19     
==========================================
+ Hits         7993     8022      +29     
+ Misses       7616     7605      -11     
- Partials     1119     1120       +1     
Flag Coverage Δ
#coverage 47.90% <ø> (+0.11%) ⬆️

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

Impacted Files Coverage Δ
...cap/tiup/components/cluster/command/edit_config.go 37.50% <0.00%> (-6.95%) ⬇️
go/src/github.com/pingcap/tiup/pkg/cliutil/tui.go 68.51% <0.00%> (-2.64%) ⬇️
...hub.com/pingcap/tiup/components/playground/main.go 80.83% <0.00%> (+0.59%) ⬆️
...m/pingcap/tiup/components/playground/playground.go 30.33% <0.00%> (+1.12%) ⬆️
...c/github.com/pingcap/tiup/pkg/cluster/api/pdapi.go 55.27% <0.00%> (+1.86%) ⬆️
.../pingcap/tiup/components/playground/utils/utils.go 27.65% <0.00%> (+27.65%) ⬆️

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 32db7e2...5adde77. Read the comment docs.

Copy link
Member

@lucklove lucklove 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-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 23, 2020
@AstroProfundis AstroProfundis added the status/can-merge Indicates a PR has been approved by a committer. label Jul 23, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@AstroProfundis AstroProfundis merged commit 0ec224a into pingcap:master Jul 23, 2020
@AstroProfundis AstroProfundis deleted the edit-on-error branch July 23, 2020 12:02
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. 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