-
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
cmd/minikube: delete accept no arguments #1718
Conversation
Can one of the admins verify this patch? |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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/test-infra repository. I understand the commands that are listed here. |
Codecov Report
@@ Coverage Diff @@
## master #1718 +/- ##
==========================================
+ Coverage 36.23% 36.25% +0.01%
==========================================
Files 51 51
Lines 3367 3371 +4
==========================================
+ Hits 1220 1222 +2
- Misses 1966 1969 +3
+ Partials 181 180 -1
Continue to review full report at Codecov.
|
Bump to verify CLA |
Ready 👍 |
a43e5e1
to
20c8128
Compare
@minikube-bot ok to test |
20c8128
to
38ae8b0
Compare
Some help with the failing test? |
cmd/minikube/cmd/delete.go
Outdated
Short: "Deletes a local kubernetes cluster", | ||
Long: `Deletes a local kubernetes cluster. This command deletes the VM, and removes all | ||
associated files.`, | ||
Use: "delete MINIKUBE_PROFILE_NAME", |
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 don't think we want to break the default minikube delete
case.
As a fix for #1683, I think we should just make sure to error on unknown arguments after command, rather than silently ignore them. i.e., $ minikube delete arg1 arg2
should fail, since we shouldn't ignore unknown arguments
As far as profiles go, each command accepts the --profile
flag.
$ minikube delete
, should work and delete the default machine
$ minikube delete --profile vm2
should delete the minikube profile vm2
I'm not a huge fan of moving the profile flag behavior to an optional noun after minikube <start, stop, delete>
since we'd probably have to have every command behave that way. Sorry if my original comment on the issue was unclear,
minikube delete either takes no args or just the machine name
I think it really can't take the machine name without a pretty big change to the UX (since all commands should behave similarly.) But the enforcing the former (no unknown args) is definitely something we should do.
Let me know if that makes sense
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.
Yep, that makes sense. Consistency among the commands :)
I have updated the PR and made delete
not accept any argument.
This changeset makes the delete command to error out if any argument is passed to it.
38ae8b0
to
17ba029
Compare
Failing again 🤷♀️ |
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.
Thanks for working through the feedback! And thanks for the PR!
As the original requester for #1683 it is great to see this enhancement added. Thanks all. |
This changeset makes it necessary to pass a profile/machine name in order
to delete. This would help avoid accidental deletion of machine by just
delete command.
Fixes #1683