Skip to content

Conversation

henry3260
Copy link

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/binaries/linux
    • ~/.minikube/cache/binaries/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)

messageImage_1759133644363

@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 requested review from nirs and prezha September 29, 2025 11:35
@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
@k8s-ci-robot
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
@minikube-bot
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.

Copy link
Author

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.

@henry3260 henry3260 requested a review from nirs September 29, 2025 13:35
@nirs
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
@nirs
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.

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

@nirs
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
@nirs
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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: henry3260, nirs
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

@k8s-ci-robot
Copy link
Contributor

@henry3260: The following test 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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move binaries in cache folder under folder called "binaries"
5 participants