-
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
Fix profile list for non existenting folder #5955
Fix profile list for non existenting folder #5955
Conversation
Signed-off-by: Adam Crowder <[email protected]>
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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/test-infra repository. I understand the commands that are listed here. |
Can one of the admins verify this patch? |
Welcome @cheeseandcereal! |
Hi @cheeseandcereal. 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cheeseandcereal 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 |
/assign @medyagh |
Codecov Report
@@ Coverage Diff @@
## master #5955 +/- ##
=======================================
Coverage 36.09% 36.09%
=======================================
Files 110 110
Lines 8208 8208
=======================================
Hits 2963 2963
Misses 4854 4854
Partials 391 391
|
Also I signed the CLA before submitting, not sure why it's showing up as not signed. My git and github email are both the same as what's in the linux foundation account |
/check-cla |
@cheeseandcereal thanks for this PR, do you mind sharing the output Before and After this PR ? |
It's in the PR description |
@cheeseandcereal yes please |
/ok-to-test |
/check-cla |
@cheeseandcereal do you mind contacting the support or try again to make sure the CLA is signed ? here is the link https://identity.linuxfoundation.org/?destination=node/285/individual-signup once CLA is signed it would be good to merge |
/check-cla |
@medyagh Should be good now |
Thank you for this improvement this will make minikube looks better |
This was reported in kubernetes#5898 and fixed in kubernetes#5955 in 2019. However the fix assumed that `listProfiles()` can return `config.ErrNotExists` while it returns `os.ErrNotExist` from `os.ReadDir`. Fixes kubernetes#15593
This was reported in [1] and fixed in [2] in 2019. However the fix assumed that `listProfiles()` can return `config.ErrNotExists` while it returns `os.ErrNotExist` from `os.ReadDir`. [1] kubernetes#5898 [2] kubernetes#5955
This was reported in [1] and fixed in [2] in 2019, but later it was broken by [3] in commit c3aafae. `listProfiles()` can return `os.ErrNotExist` from `os.ReadDir()` so it must be tested with `os.IsNotExist()`. [1] kubernetes#5898 [2] kubernetes#5955 [3] kubernetes#6440
Fixes #5898
Behavior of
minikube profile list -o json
was dependent whether or not the$MINIKUBE_HOME/profiles
folder exists or not.This small update simply checks if the error is due to the folder not existing, and if so, simply returns the normal empty array results with a normal exit code
Before:
After: