-
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
Behavior change: start with no arguments uses existing cluster config #7449
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
All Times minikube: [ 65.975062 65.493687 64.066381] Average minikube: 65.178377 Averages Time Per Log
|
All Times minikube: [ 68.677821 67.571879 66.023208] Average minikube: 67.424303 Averages Time Per Log
|
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.
Looks good, but also subtle enough that it needs an integration test.
644f36b
to
84693ea
Compare
All Times minikube: [ 66.572089 65.297555 65.810070] Average minikube: 65.893238 Averages Time Per Log
|
Codecov Report
@@ Coverage Diff @@
## master #7449 +/- ##
==========================================
- Coverage 37.07% 36.67% -0.41%
==========================================
Files 146 146
Lines 8871 8980 +109
==========================================
+ Hits 3289 3293 +4
- Misses 5193 5294 +101
- Partials 389 393 +4
|
All Times minikube: [ 71.772491 64.711845 66.667994] Average minikube: 67.717443 Averages Time Per Log
|
All Times minikube: [ 72.477549 66.346935 64.828128] Average minikube: 67.884204 Averages Time Per Log
|
All Times minikube: [ 65.846263 66.792026 66.708484] Average minikube: 66.448924 Averages Time Per Log
|
All Times minikube: [ 68.268333 69.220528 65.387331] Average Minikube (PR 7449): 66.362986 Averages Time Per Log
|
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.
One tricky part of this soft start PR, is that it changes the behavior of minikube: always respect the flags set to --start
. We did admittedly start to creep in this direction however when changing it so that the kubernetes-version
is sticky.
If a user omits start
flags, minikube has always tried to start the cluster up with default values.
This terrible and confusing behavior is why we've spoken about splitting cluster creation commands from cluster startup commands.
Just to understand, is the behavior you are suggesting in this PR to:
- If "minikube start" is run with no flags, use the previous configuration with no changes
- If "minikube start" is run with flags, overwrite the previous configuration (no merge)
Thank you for cleaning this yuckier part of our UX up.
Also, since this is an explicit behavioral change, give the PR a really clear title. |
Merging start.go and flags.go into start_flags.go makes this change hard to review, and I don't think it's especially necessary. Is there a reason for the change? |
thank you thats a good point, I will do that on my next PRs. |
All Times minikube: [ 65.143763 66.057339 65.568464] Average minikube: 65.589855 Averages Time Per Log
|
All Times minikube: [ 66.125782 64.535043 64.835762] Average minikube: 65.165529 Averages Time Per Log
|
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.
LGTM pending integration tests.
If possible, please leave this PR open for at least 48 hours for visibility to others.
Change behavior of minikube start
if minkube already started with args
like
minikube start --container-runtime=containerd
a
minikube start
(without args) on an already started minikube should NOT change the run-time back to the default config ('docker').an attempt to fix soft "start" without args - will overwrite the container-runtime to docker. #7448
unfourntaely, it is not clear since when this is broken but currently the minikube does not respect the profile config.
also fixes the Port : 0 in our configs .
before this PR:
minikube start --driver=hyperkit --container-runtime=conrtainerd
Fine.
minikube start --driver=hyperkit --container-runtime=conrtainerd
Fine Also
but !!!! if you do a soft start without args:
minikube start
and in the config, you will see, the run time has been changed to docker
and minikube disrepects the user and restarts the cluster with a hard start to a different container-runtime.
Integeration test:
added a SoftStart integeration tests to the functional tests
also in
#7435 there is additional tests for soft start that validates it doesn not do a reset.
I tested locally on mac hyperkit seems to be working.
I did this PR with a tired mind, I do feel like I might have missed some flags in the 'func updateExistingConfigFromFlags' . please anyone who reviews this, review with 80% chance of human error on my side on This PR.