-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fixed accidental folder deletion bug when using minikube delete --purge
#19771
Conversation
The committers listed above are authorized under a signed CLA. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: johnmatthiggins The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @johnmatthiggins! |
Hi @johnmatthiggins. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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 kubernetes-sigs/prow repository. |
Can one of the admins verify this patch? |
@@ -47,12 +47,7 @@ func MiniPath() string { | |||
if filepath.Base(minikubeHomeEnv) == ".minikube" { | |||
return minikubeHomeEnv | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we kind of did a mistake in the previous release not to think about this, the rightthing to do is,
in the delete --purge code. we need to Check What folders we are deleting...and if there is any folder other than minikube sub folders we should Warn the user if they wanna proceed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed you left a comment on issue #19769 that describes an alternative solution:
alternatvely we should enforce users to set their minikube home folder to something that is called .minikube, so in the purge we only delete .minikube folder
I replied to the comment detailing why I think this alternative is the best approach and that adding a prompt while keeping the current MiniPath() behavior will actually be not aid in the overall goal of getting users to use a directory named ".minikube" as the config directory.
I'm a little confused about what solution to pursue of the two options presented in the comment. If you want a yes/no prompt that verifies whether the user wants to delete a directory when it's not named ".minikube" then I can rewrite the code. Just let me know, because I'm a little unclear on what direction I should go in.
Closing this because it has been replaced by PR #20045 |
fixes #19769