Repository navigation
Make error message more human readable - #5563
Conversation
Changes made: * service.go - changes to the error string returned * service_test.go - modify TestWaitAndMaybeOpenService test case to accomodate for the new changes
|
Hi @nanikjava. 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. DetailsInstructions 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: nanikjava The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Can one of the admins verify this patch? |
Travis tests have failedHey @nanikjava, 1st Buildmake testTravisBuddy Request Identifier: 07ff37a0-e951-11e9-97f2-39e9ef4a9673 |
Codecov Report
@@ Coverage Diff @@
## master #5563 +/- ##
=========================================
+ Coverage 36.63% 37.23% +0.6%
=========================================
Files 102 103 +1
Lines 7346 7528 +182
=========================================
+ Hits 2691 2803 +112
- Misses 4298 4352 +54
- Partials 357 373 +16
|
|
|
||
| if err := retry.Expo(chkSVC, time.Duration(interval)*time.Second, time.Duration(wait)*time.Second); err != nil { | ||
| return errors.Wrapf(err, "Could not find finalized endpoint being pointed to by %s", service) | ||
| return errors.Wrapf(err, "Service %s was not found in default namespace , please try with 'minikube service %s -n Y'", service, service) |
There was a problem hiding this comment.
I love this text, but it should detect if namespace is default, otherwise the error message doesn't make much sense.
There was a problem hiding this comment.
Made changes to the string to include the service name.
| urlMode bool | ||
| https bool | ||
| err bool | ||
| nondefault bool |
There was a problem hiding this comment.
bools should never be negative or have a name that starts with with no: it gets too confusing, particularly for non-english readers, when nondefault=false. I also don't understand what this bool is the default of.
Instead of default or nondefault, I think this would be more readable if each test directly defined which servicesMap to use.
There was a problem hiding this comment.
Will look into the test again and refactor to make it more readable for code structure
There was a problem hiding this comment.
Refactor the code to split out the test on it's own to make it more easier to understand for other. Let me know what you think ?. Thanks
… error text to include service name
|
/assign |
|
/ok-to-test |
|
|
||
| if err := retry.Expo(chkSVC, time.Duration(interval)*time.Second, time.Duration(wait)*time.Second); err != nil { | ||
| return errors.Wrapf(err, "Could not find finalized endpoint being pointed to by %s", service) | ||
| return errors.Wrapf(err, "Service %s was not found in %s namespace , please try with 'minikube service %s -n Y'", service, namespace, service) |
There was a problem hiding this comment.
If I understand properly, "Y" doesn't have a special meaning. What do you think about something like this:
Service %s was not found in the %q namespace. You may select another namespace by using:
'minikube service %s -n <namespace>'
There was a problem hiding this comment.
Make sense. PR has been updated. Thanks
fixes #5271
Changes made:
for the new changes