-
Notifications
You must be signed in to change notification settings - Fork 8.1k
make installation error details become more clear when building kubernetes client #33587
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
Conversation
I have done 2 test cases in my environment as below: With wrong value of KUBECONFIG:
With wrong information inside config file of KUBECONFIG:
|
/test unit-tests_istio |
operator/cmd/mesh/install.go
Outdated
operation := "encounter error when creating Kubernetes client, error detail" | ||
return wrapErrorf(operation, err) |
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.
operation := "encounter error when creating Kubernetes client, error detail" | |
return wrapErrorf(operation, err) | |
return fmt.Errorf("create Kubernetes client: %v", err) |
This follows standard patterns in the rest of the code base. When creating errors like this, we get useful messages as errors propogate up, like installation failed: create Kubernetes client: permission denied
or similar
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.
similar comment applies to the rest
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.
got it
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.
@howardjohn the code style is the same now. ^_^
make installation error details become more clear when building kubernetes client based on issue#33402
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
Please check any characteristics that apply to this pull request.
[ ] Does not have any user-facing changes. This may include CLI changes, API changes, behavior changes, performance improvements, etc.