-
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
UI: Advice when user tries to set profile name to "delete" or "start" #4883
Comments
i would like to pick this up. /assign |
/assign |
@medyagh when user tries to create profiles with reserved keywords(delete, start, stop, status, etc ...) system should restrict the user from creating and throw an error? |
I would say exit with an Advice, and yes it should not allow you create a profile in the reserved names. the reserved names could be the basic commands, |
@bhanu011 we had a discussion on this in minikube office hours. Please sync with @josedonizetti to handle this issue |
@medyagh ok @josedonizetti any changes to the design discussed in above comments? |
@bhanu011 yes we had a change in design, you could still work on it if you like, please sync with @josedonizetti for any help you need with this PR ! |
@bhanu011 Currently if you do Basically, we need to change Let me know if you still want to work on this! And if you have any questions. :) |
@josedonizetti i am done with code according to previous design i was just writing unit test cases. I would like to continue working on this. Here are few questions I have
|
|
|
@bhanu011 That's the thing, |
@josedonizetti ok got it, i will implement changes |
@medyagh @josedonizetti sorry for posting here, but i am getting below error when doing go build
Could you please help on this I am not able to find root cause/fix |
@bhanu011 if you rebase from the latest master you shouldn't get this problem when building |
Relate-to: #4909 |
@josedonizetti looks like valid profiles doesnt return default profile "minikube" which is a valid profile when profile name is given as "default" right? |
@bhanu011 sorry for the delay, was away last week. I have just tested |
@bhanu011 @tstromberg when I run |
@josedonizetti @medyagh If the original assignee is not working on this I'm happy to take over this issue ?. Let me know. Thanks |
Looks like this issue need to be closed as it's been merged to master. |
@nanikjava Do you want to work on #4913? I haven't had much time to look into it. Let me know and I'll assign it to you. |
@josedonizetti yes please assign it to me. Thanks |
@nanikjava you can assign to yourself by adding a comment with |
/assign |
Fixes : kubernetes#4883 New function ProfileNameInReservedKeywords(..) has been added inside pkg/minikube/config/profile.go The new function perform validation to make sure the profile name is not in the list of keywords. Following are the keywords that are used: start, stop, status, delete, config, open, profile, addons, cache, logs The checking is case insensitive to cover combo of upper and lower case
@josedonizetti PR is ready for review #5624 Thanks |
Fixes : kubernetes#4883 New function ProfileNameInReservedKeywords(..) has been added inside pkg/minikube/config/profile.go The new function perform validation to make sure the profile name is not in the list of keywords. Following are the keywords that are used: start, stop, status, delete, config, open, profile, addons, cache, logs The checking is case insensitive to cover combo of upper and lower case
to delete a minikube profile you need to do
minikube delete -p prof_name
but if you do
minikube profile delete
it will actually create a profile named delete. because that command sets profile name.
we need to at lest add an advice to the user, that says
Did you mean to delete a profile ? and here is the command to delete profile !
I recommend the same approach for other key words such as, start, stop, status, ... to make it less confusing for new users.
we could add this to the Unit tests of profile, so if someone tries to set the profile name to a list of reserved words, it should return an error.
The text was updated successfully, but these errors were encountered: