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: add significant warning destroying a cluster #1723

Merged
merged 2 commits into from
Jan 14, 2022

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

Close #1722

What is changed and how it works?

Add a significant warning when the users tries to destroy a cluster. It requires the user to input a long sentence to confirm (instead of a simple "Y/y" letter) so it's highly not possible for the user to destroy a cluster by mistake.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    图片

Release notes:

NONE

@AstroProfundis AstroProfundis added this to the v1.9.0 milestone Jan 12, 2022
@AstroProfundis AstroProfundis self-assigned this Jan 12, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 12, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • srstack

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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 12, 2022
@AstroProfundis AstroProfundis requested review from nexustar and srstack and removed request for july2993 and breezewish January 13, 2022 10:10
Copy link
Collaborator

@nexustar nexustar left a comment

Choose a reason for hiding this comment

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

the test script need to be modified duo the change of "y"

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2022

Codecov Report

Merging #1723 (741f769) into master (7bfbed1) will increase coverage by 25.83%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1723       +/-   ##
===========================================
+ Coverage   24.43%   50.25%   +25.83%     
===========================================
  Files         277      300       +23     
  Lines       31449    34172     +2723     
===========================================
+ Hits         7682    17173     +9491     
+ Misses      22914    15022     -7892     
- Partials      853     1977     +1124     
Flag Coverage Δ
cluster 41.29% <0.00%> (?)
dm 24.75% <0.00%> (?)
playground 12.73% <ø> (?)
tiup ?
unittest 21.34% <0.00%> (-<0.01%) ⬇️

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

Impacted Files Coverage Δ
pkg/cluster/manager/destroy.go 52.59% <0.00%> (+52.59%) ⬆️
main.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/utils/hash.go 0.00% <0.00%> (-81.25%) ⬇️
pkg/repository/model/publish.go 0.00% <0.00%> (-80.00%) ⬇️
cmd/env.go 25.00% <0.00%> (-70.00%) ⬇️
pkg/utils/args.go 0.00% <0.00%> (-45.45%) ⬇️
pkg/repository/v1manifest/repo.go 0.00% <0.00%> (-45.13%) ⬇️
cmd/root.go 19.50% <0.00%> (-44.50%) ⬇️
pkg/repository/model/model.go 0.00% <0.00%> (-43.60%) ⬇️
cmd/uninstall.go 31.25% <0.00%> (-40.00%) ⬇️
... and 241 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 7bfbed1...741f769. Read the comment docs.

@AstroProfundis AstroProfundis force-pushed the warn-destroy branch 2 times, most recently from 52c6e76 to b175ec1 Compare January 13, 2022 10:41
Copy link
Collaborator

@srstack srstack 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 ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 13, 2022
@AstroProfundis
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 741f769

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 14, 2022
@ti-chi-bot ti-chi-bot merged commit ff446c1 into pingcap:master Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 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.

Limit the use of tiup-cluster destroy
5 participants