-
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
profile list --output json
handle empty config folder
#16900
profile list --output json
handle empty config folder
#16900
Conversation
Hi @raghavendra-talur. 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. |
Can one of the admins verify this patch? |
This fix is based on the suggestion provided in a previous PR that attempted to fix this problem. |
@@ -301,6 +301,10 @@ func profileDirs(miniHome ...string) (dirs []string, err error) { | |||
} | |||
pRootDir := filepath.Join(miniPath, "profiles") | |||
items, err := os.ReadDir(pRootDir) | |||
if err == os.IsNotExist(err) { | |||
return dirs, &ErrNotExist{fmt.Sprintf("profiles dir %s does not exist", pRootDir)} | |||
} |
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 the best way to handle this is to return here empty list of directories and no error since this is an expected condition before any profile was created, or if a user deleted the profiles directory.
However if we report an error, we should do the check correctly - it seems that you are adding here a wrong check:
if err == os.IsNotExist(err)
And you fix it in the next commit? Did you forget to squash the next commit into this?
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 squashed the next commit. The comparison is good now.
About the error return; I am hoping that that error case is handled specially as it is a ERRNOTEXIST and I am leaving that handling to the caller.
b9aa2a0
to
0227042
Compare
0227042
to
7594c10
Compare
@medyagh @sharifelgamal Could you please take a look at this PR in your next review cycle? Any feedback or suggestions are most welcome. |
@medyagh Just checking if you have any feedback for this PR. I can close this if you think it is not worth fixing. |
If `minikube profile list` is called before `minikube start` it fails because `$MINIKUBE_HOME/.minikube/profiles` does not exist[1]. I posted a fix[1] on Jan 5 2023 but it was not accepted. Talur posted another fix[2] on July 18 2023 but it is still waiting for review. Fixing it in drenv until minikube maintainers find time to handle this. [1] kubernetes/minikube#15593 [2] kubernetes/minikube#15594 [3] kubernetes/minikube#16900 Signed-off-by: Nir Soffer <[email protected]>
If `minikube profile list` is called before `minikube start` it fails because `$MINIKUBE_HOME/.minikube/profiles` does not exist[1]. I posted a fix[1] on Jan 5 2023 but it was not accepted. Talur posted another fix[2] on July 18 2023 but it is still waiting for review. Fixing it in drenv until minikube maintainers find time to handle this. [1] kubernetes/minikube#15593 [2] kubernetes/minikube#15594 [3] kubernetes/minikube#16900 Signed-off-by: Nir Soffer <[email protected]>
If `minikube profile list` is called before `minikube start` it fails because `$MINIKUBE_HOME/.minikube/profiles` does not exist[1]. I posted a fix[1] on Jan 5 2023 but it was not accepted. Talur posted another fix[2] on July 18 2023 but it is still waiting for review. Fixing it in drenv until minikube maintainers find time to handle this. [1] kubernetes/minikube#15593 [2] kubernetes/minikube#15594 [3] kubernetes/minikube#16900 Signed-off-by: Nir Soffer <[email protected]>
If `minikube profile list` is called before `minikube start` it fails because `$MINIKUBE_HOME/.minikube/profiles` does not exist[1]. I posted a fix[1] on Jan 5 2023 but it was not accepted. Talur posted another fix[2] on July 18 2023 but it is still waiting for review. Fixing it in drenv until minikube maintainers find time to handle this. [1] kubernetes/minikube#15593 [2] kubernetes/minikube#15594 [3] kubernetes/minikube#16900 Signed-off-by: Nir Soffer <[email protected]>
Any chance to get a review of for this tiny fix? |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
7594c10
to
bd4506e
Compare
/ok-to-test |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: raghavendra-talur 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 |
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 @nirs and @raghavendra-talur for this PR and the review and sorry this PR got lost in the long list of PRs, will run test on it
kvm2 driver with docker runtime
Times for minikube start: 49.2s 49.5s 49.1s 51.7s 49.1s Times for minikube ingress: 23.5s 24.4s 23.9s 24.4s 24.4s docker driver with docker runtime
Times for minikube start: 21.0s 20.8s 24.0s 23.8s 21.1s Times for minikube ingress: 21.2s 21.8s 21.7s 22.7s 21.7s docker driver with containerd runtime
Times for minikube start: 22.5s 20.6s 23.3s 22.9s 22.5s Times for minikube ingress: 32.2s 31.7s 47.2s 32.2s 33.2s |
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. |
thank you for this PR ! |
profile list --output json
handle empty config folder
fixes #15593