Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move linux/darwin binaries into cache/binaries folder (#21179) #21664

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

Open
henry3260 wants to merge 1 commit into kubernetes:master
base: master
Choose a base branch
Loading
from henry3260:feature/move-cache

Conversation

@henry3260
Copy link
Contributor

@henry3260 henry3260 commented Sep 29, 2025
edited
Loading

This PR addresses issue #21179 by reorganizing the cache folder structure for binaries.

Before

  • Binaries for Linux and Darwin were placed directly under:
    • ~/.minikube/cache/linux
    • ~/.minikube/cache/darwin

After

  • They are now moved into a dedicated binaries subfolder:
    • ~/.minikube/cache/bin/linux
    • ~/.minikube/cache/bin/darwin

Why

  • This improves organization of the cache directory.
  • Aligns binaries with how other cached items (e.g., images, ISO files) are stored.
  • No functional behavior is changed, only the storage path for binaries.

Fixes #21179

Screenshot (Before)

image

Screenshot (After)

image

nirs reacted with thumbs up emoji
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 29, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 29, 2025
Copy link
Contributor

Hi @henry3260. 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.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 29, 2025
Copy link
Collaborator

Can one of the admins verify this patch?

func Binary(binary, version, osName, archName, binaryURL string) (string, error) {
targetDir := localpath.MakeMiniPath("cache", osName, archName, version)
// targetDir := localpath.MakeMiniPath("cache", osName, archName, version)
targetDir := localpath.MakeMiniPath("cache", "binaries", osName, archName, version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use "bin", it is more consistent with ~/.minikube/bin and the rest of the world.

We are using "binaries" internally which would nice to change also to bin but it may be harder since we may code using it. Since this cache directory is new we don't have backward compatibility concerns.

henry3260 reacted with thumbs up emoji
Copy link
Contributor Author

@henry3260 henry3260 Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use "bin", it is more consistent with ~/.minikube/bin and the rest of the world.

We are using "binaries" internally which would nice to change also to bin but it may be harder since we may code using it. Since this cache directory is new we don't have backward compatibility concerns.

Thanks for the suggestion! That makes sense, I’ll update it to use bin for consistency.

Copy link
Contributor

nirs commented Sep 29, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 29, 2025
Copy link
Contributor

nirs commented Sep 29, 2025

/assign @medyagh


// check that the bin directory was created
targetDir := filepath.Join(
os.Getenv("HOME"), ".minikube", "cache", "bin", "linux", "amd64", "v1.31.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~/.minikube is the default, but if MINIKUBE_HOME is defined it will be used. There is a helper function to return the right path (but I don't remember the function name). Check what other tests are doing.

henry3260 reacted with heart emoji
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
// check that the bin directory was created
targetDir := filepath.Join(
os.Getenv("HOME"), ".minikube", "cache", "bin", "linux", "amd64", "v1.31.0",
localpath.MiniPath(), "cache", "bin", "linux", "amd64", "v1.31.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, to make it even better squash this commit into the first one. Having this in git history is not helpful.

Copy link
Contributor

nirs commented Oct 3, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
Copy link
Contributor

nirs commented Oct 3, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2025
Copy link
Member

medyagh commented Oct 17, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 17, 2025
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR, please update the before/after (it seems to be outdated)

Copy link

kvm2 driver with docker runtime

┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 21664 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 43.3s │ 43.5s │
│ enable ingress │ 16.0s │ 16.1s │
└────────────────┴──────────┴────────────────────────┘

Times for minikube ingress: 15.3s 15.3s 16.4s 15.8s 17.4s
Times for minikube (PR 21664) ingress: 16.9s 16.3s 15.3s 16.3s 15.9s

Times for minikube start: 45.8s 43.6s 42.4s 42.7s 42.0s
Times for minikube (PR 21664) start: 46.1s 41.4s 44.7s 43.5s 41.6s

docker driver with docker runtime

┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 21664 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 23.3s │ 23.8s │
│ enable ingress │ 11.1s │ 11.9s │
└────────────────┴──────────┴────────────────────────┘

Times for minikube start: 23.3s 23.0s 23.5s 22.5s 24.4s
Times for minikube (PR 21664) start: 27.2s 22.1s 22.0s 25.3s 22.4s

Times for minikube ingress: 10.7s 10.6s 10.7s 12.6s 10.7s
Times for minikube (PR 21664) ingress: 11.7s 11.8s 11.7s 13.7s 10.7s

docker driver with containerd runtime

┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 21664 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 20.9s │ 20.5s │
│ enable ingress │ 21.5s │ 21.3s │
└────────────────┴──────────┴────────────────────────┘

Times for minikube ingress: 21.1s 22.1s 22.1s 21.1s 21.1s
Times for minikube (PR 21664) ingress: 22.1s 20.2s 21.1s 22.2s 21.1s

Times for minikube start: 21.3s 20.2s 21.2s 20.7s 21.2s
Times for minikube (PR 21664) start: 20.2s 23.5s 19.4s 20.5s 19.0s

Copy link

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
none_Linux (2 failed) TestDownloadOnly/v1.28.0/binaries(gopogh) Unknown
none_Linux (2 failed) TestDownloadOnly/v1.34.1/binaries(gopogh) Unknown
Docker_Linux (1 failed) TestNetworkPlugins/group/kubenet/Start(gopogh) 0.00% (chart)
Docker_Windows (5 failed) TestDownloadOnly/v1.28.0/kubectl(gopogh) Unknown
Docker_Windows (5 failed) TestDownloadOnly/v1.34.1/kubectl(gopogh) Unknown
Docker_Windows (5 failed) TestAddons/serial/Volcano(gopogh) Unknown
Docker_Windows (5 failed) TestErrorSpam/setup(gopogh) Unknown
Docker_Windows (5 failed) TestRunningBinaryUpgrade(gopogh) Unknown

Besides the following environments also have failed tests:

To see the flake rates of all tests by environment, click here.

Copy link
Contributor Author

thanks for the PR, please update the before/after (it seems to be outdated)

updated!

Copy link
Contributor

@henry3260: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-minikube-integration fca5789 link true /test pull-minikube-integration
integration-kvm-docker-linux-x86-64 fca5789 link true /test integration-kvm-docker-linux-x86-64
integration-kvm-containerd-linux-x86-64 fca5789 link true /test integration-kvm-containerd-linux-x86-64
integration-docker-crio-linux-x86-64 fca5789 link true /test integration-docker-crio-linux-x86-64
integration-kvm-crio-linux-x86-64 fca5789 link true /test integration-kvm-crio-linux-x86-64
integration-docker-containerd-linux-x86-64 fca5789 link true /test integration-docker-containerd-linux-x86-64
integration-docker-docker-linux-x86-64 fca5789 link true /test integration-docker-docker-linux-x86-64
integration-none-docker-linux-x86-64 fca5789 link true /test integration-none-docker-linux-x86-64

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.

Copy link
Contributor

nirs commented Oct 23, 2025

thanks for the PR, please update the before/after (it seems to be outdated)

updated!

It is still outdated:

They are now moved into a dedicated binaries subfolder:
~/.minikube/cache/binaries/linux
~/.minikube/cache/binaries/darwin

Copy link
Contributor Author

thanks for the PR, please update the before/after (it seems to be outdated)

updated!

It is still outdated:

They are now moved into a dedicated binaries subfolder:
~/.minikube/cache/binaries/linux
~/.minikube/cache/binaries/darwin

Thanks for pointing that out! I've corrected it now.

Copy link
Contributor

nirs commented Oct 23, 2025

@henry3260 this change broke few test:

=== RUN TestDownloadOnly/v1.28.0/binaries
aaa_download_only_test.go:157: expected the file for binary exist at "/home/jenkins/minikube-integration/21664-14293/.minikube/cache/linux/amd64/v1.28.0/kubelet" but got error stat /home/jenkins/minikube-integration/21664-14293/.minikube/cache/linux/amd64/v1.28.0/kubelet: no such file or directory
aaa_download_only_test.go:157: expected the file for binary exist at "/home/jenkins/minikube-integration/21664-14293/.minikube/cache/linux/amd64/v1.28.0/kubeadm" but got error stat /home/jenkins/minikube-integration/21664-14293/.minikube/cache/linux/amd64/v1.28.0/kubeadm: no such file or directory
aaa_download_only_test.go:157: expected the file for binary exist at "/home/jenkins/minikube-integration/21664-14293/.minikube/cache/linux/amd64/v1.28.0/kubectl" but got error stat /home/jenkins/minikube-integration/21664-14293/.minikube/cache/linux/amd64/v1.28.0/kubectl: no such file or directory

Please run integration tests locally and fix the failing tests.
See https://minikube.sigs.k8s.io/docs/contrib/testing/

Copy link
Contributor

@nirs nirs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix the tests assuming the old location.

The issue is we compute the path manually in the test and in the code. We need a helper to locate the binaries that can be used by the code and the tests.

Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: henry3260
Once this PR has been reviewed and has the lgtm label, please ask for approval from medyagh. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@medyagh medyagh medyagh requested changes

@prezha prezha Awaiting requested review from prezha

+1 more reviewer

@nirs nirs nirs requested changes

Reviewers whose approvals may not affect merge requirements

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

move binaries in cache folder under folder called "binaries"

AltStyle によって変換されたページ (->オリジナル) /