-
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
Don't allow creating profile by profile command #6672
Don't allow creating profile by profile command #6672
Conversation
Hi @aallbrig. 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aallbrig 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 |
Codecov Report
@@ Coverage Diff @@
## master #6672 +/- ##
==========================================
+ Coverage 38.56% 38.58% +0.01%
==========================================
Files 142 142
Lines 8642 8639 -3
==========================================
Hits 3333 3333
+ Misses 4893 4890 -3
Partials 416 416
|
Can one of the admins verify this patch? |
Thank you for the pr. Do you mind adding integration tests for this ? You could look up examples of functional tests and add one more tests under functional tests |
@medyagh I can but not tonight. I’m spending time with the fiancé for the rest of the night. It’s 9:14 p.m. EST. I’ll see about getting this done between 7 a.m. and 8 a.m. tomorrow. |
@medyagh I'm on it now |
07a847d
to
089deef
Compare
@medyagh I found that there were integration tests for profile already existing! I created tests for nonexistent profiles and the desired behavior described in the issue. I look forward to your review. Its 7:12 a.m. EST now. I'll have a block of time during lunch and another block of time after work to address feedback you (or others) provide. |
@medyagh Is there anything else I can do? |
/ok-to-test |
Error: running mkcmp: exit status 1 |
@aallbrig thank you so much for this PR ! this looks good to me just a small nit. and thank you for adding integraiotn tests for it too |
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.
this PR is short and sweet and is great ! and fixes an annoyance for the users.
thank you just a small request to improve the integration tests (parse the json output instead of parsing the stdoutput )
test/integration/functional_test.go
Outdated
if err != nil { | ||
t.Errorf("%s failed: %v", rr.Args, err) | ||
} | ||
for _, line := range []string{fmt.Sprintf("Created a new profile : %s", nonexistentProfile), fmt.Sprintf("minikube profile was successfully set to %s", nonexistentProfile)} { |
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.
how about instead of parsing the output, do a
"minikube profile list --output=json" and expect not to see the "lis" in the created profiles?
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.
Absolutely! I’ll update it today
@medyagh Touching base: doing a trivia night with friends & S.Os. My plan is to do the refactor later today. Cheers! |
thanks for keeping me up to date ! have fun at the trivia :) |
@medyagh Updated tests to use JSON output to determine expected behavior. Please let me know how I can improve this change set :) |
All Times minikube: [ 96.652477 93.172916 92.120139] Average minikube: 93.981844 Averages Time Per Log
|
Woohoo! |
The Change Set
Fixes #6647
This updates
profile
to no longer create profiles that do not exist and provides feedback to user on how to create the non-existent profile.Just One Snag...
One thing brought up in the issue that doesn't appear to be true is...
However;
minikube profile pname
does not changeprofile
topname
before this change set. This seems like it would be new functionalityInstead of renaming
profile
topname
, it instead creates apname
profile that needs to be deleted.TLDR; This aspect of issue #6647 may be a new feature request because this behavior does not exist today.
See below screenshots.