-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Skip Kubernetes preloads and binary downloads when --no-kubernetes is... #21107 #21139
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
Skip Kubernetes preloads and binary downloads when --no-kubernetes is... #21107 #21139
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: divysinghvi
Once this PR has been reviewed and has the lgtm label, please assign prezha for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Hi @divysinghvi. 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 /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
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?
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.
thank you @divysinghvi please consider adding an integraiton test sub-test to
before {"StartNoK8sWithVersion", validateStartNoK8sWithVersion}, you can do --download-only and check using -minikube ssh -- ls path/to/binary/- that the file doesnt exist
@medyagh Thanks for the suggestion! Just to clarify, for the integration test you mentioned, which exact Kubernetes binary path should I check for in the VM after running minikube with --no-kubernetes --download-only
?
but i am confused what exact binary path should i check for
Lets also try not setting k8s version to 0.0.0 and see what breaks and why did we have to that
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.
lets add a sub test that that checks this folder should not exist
~/.minikube/cache/linux/amd64/v0.0.0/
ok-to-test
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.
no need to start another minikube, use the Existing started minikube and simply add a sub test
like this
{"StartNoK8sWithVersion", validateStartNoK8sWithVersion},
---> {"VerifyNok8sNoK8sDownloads", },
{"StartWithK8s", validateStartWithK8S},
{"StartWithStopK8s", validateStartWithStopK8s},
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.
since in StartNoK8sWithVersion we pass a Kubernetes version with --no-kubernetes isn't that suppose to exits with an error and that won't leave a running cluster to reuse i guess.
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.
maybe we are reuse this instance {"Start", validateStartNoK8S}, since it will be fresh working instance
/ok-to-test
...KubernetesT est now pass locally also fixed the error from fatel to Errorf
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/retest
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
...ith no kubernetes
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.
question is why Other tests generated any folder with "v0.0.0" ?
how about instead of this, When it fails we can list the minikube home and check why it is there in first place.
Before minikube test starts, we purge and have we have separte minikube home for the test
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.
that would be way better approach i had some issue with it so i was experimenting with thing i will look more into it thanks , yes the other tests should also not generate the folder with "v0.0.0" i was just experimenting with things if that fixes it and also one more issue i am facing is the tests are passing on my system since my last 3 commit
WhatsApp Image 2025年09月26日 at 14 58 12
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/retest
/retest-required
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/retest
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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 should not be tested only on linux !
the reason it is passing on your machine it is beecause it checks to see if linux doesnt exist
you can use goos to get os
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 medhya i have now used GOOS to get current os, and yes it passes on my system now also
=== RUN TestNoKubernetes/serial/VerifyNok8sNoK8sDownloads no_kubernetes_test.go:91: Checking cache directory: /Users/divysinghvi/.minikube/cache/darwin/arm64/v0.0.0 no_kubernetes_test.go:104: No cache directory found (as expected)
also found a function in binary.go TransferBinaries this maybe creating directories so testing it now
...used GOOS to get the current OS
@divysinghvi: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
minikube-pr-bot
commented
Oct 9, 2025
kvm2 driver with docker runtime
┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 21139 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 45.7s │ 43.7s │
│ enable ingress │ 15.9s │ 15.8s │
└────────────────┴──────────┴────────────────────────┘
Times for minikube start: 44.1s 47.8s 44.2s 47.6s 44.8s
Times for minikube (PR 21139) start: 41.3s 43.7s 45.1s 45.3s 43.3s
Times for minikube (PR 21139) ingress: 15.8s 15.8s 15.8s 15.8s 15.8s
Times for minikube ingress: 15.8s 15.9s 16.3s 15.3s 16.3s
docker driver with docker runtime
┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 21139 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 22.1s │ 23.0s │
│ enable ingress │ 12.4s │ 12.4s │
└────────────────┴──────────┴────────────────────────┘
Times for minikube start: 20.9s 21.1s 22.2s 25.4s 21.1s
Times for minikube (PR 21139) start: 21.8s 23.9s 24.1s 23.4s 21.6s
Times for minikube ingress: 13.6s 12.6s 11.6s 12.6s 11.6s
Times for minikube (PR 21139) ingress: 10.6s 13.6s 12.6s 10.6s 14.6s
docker driver with containerd runtime
┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 21139 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 21.1s │ 21.1s │
│ enable ingress │ 20.7s │ 20.3s │
└────────────────┴──────────┴────────────────────────┘
Times for minikube start: 20.2s 19.1s 22.2s 24.0s 20.0s
Times for minikube (PR 21139) start: 19.1s 21.3s 22.4s 20.4s 22.4s
Times for minikube ingress: 20.1s 21.1s 21.2s 21.1s 20.1s
Times for minikube (PR 21139) ingress: 21.1s 20.1s 20.1s 20.1s 20.1s
@medyagh i tired putting a lot of checks but was not able to identify what is causing the directory to get created but we are able to step the files being created, directory thing i am not able to verify what is causing that you also told me to check localpath.go but i was not able to identify specific for our purpose , now we have either one option we go with the only file approach and have directory check but the test fails only when we have the files in those or figure out a way for finding directory thing in linux
minikube-pr-bot
commented
Oct 10, 2025
Here are the number of top 10 failed tests in each environments with lowest flake rate.
Besides the following environments also have failed tests: To see the flake rates of all tests by environment, click here. |
it is interesting on my mac and personal linux it does not create v0.0.0 folder but in CI machines it does ! this is a mystrie !
yes @medyagh i have tried everything i could find like i am still not able to figure how folder is getting created in the ci testing it is so weird , since now even you have verified it is not creating the v 0.0.0 when are testing it locally how should be proceed it next? easiest approach would be to check for files within the folder and let it pass when the directory is empty or anything other in mind ??
This PR improves the Binary function in binary.go to better handle Kubernetes binary downloads. It adds logic to skip downloads when the --no-kubernetes flag is set, ensures not downloading unnecessary downloads with version v0.0.0
Before
Screenshot 2025年07月25日 at 1 05 43 PM
After
Screenshot 2025年07月25日 at 1 08 30 PM
This pr Fixes the issue #21107