-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
base: master
Are you sure you want to change the base?
Conversation
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 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-sigs/prow repository. |
Can one of the admins verify this patch? |
pkg/minikube/download/binary.go
Outdated
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) |
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.
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.
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.
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.
d3e6101
to
2e7c8cf
Compare
/lgtm |
/assign @medyagh |
|
||
// check that the bin directory was created | ||
targetDir := filepath.Join( | ||
os.Getenv("HOME"), ".minikube", "cache", "bin", "linux", "amd64", "v1.31.0", |
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.
~/.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.
// 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", |
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, to make it even better squash this commit into the first one. Having this in git history is not helpful.
/lgtm |
aa3b2e4
to
fca5789
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: henry3260, nirs 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 |
@henry3260: 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. |
This PR addresses issue #21179 by reorganizing the cache folder structure for binaries.
Before
~/.minikube/cache/linux
~/.minikube/cache/darwin
After
binaries
subfolder:~/.minikube/cache/binaries/linux
~/.minikube/cache/binaries/darwin
Why
Fixes #21179
Screenshot (Before)
Screenshot (After)