-
Notifications
You must be signed in to change notification settings - Fork 7k
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: stop discovery errors from halting chart rendering. #6908
fix: stop discovery errors from halting chart rendering. #6908
Conversation
0cda232
to
06474e3
Compare
This blocks a particular error (caused by upstream discovery client), printing a warning instead of failing. It's not a great solution, but is a stop-gap until Client-Go gets fixed. Closes helm#6361 Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
06474e3
to
193ff2b
Compare
// Client-Go emits an error when an API service is registered but unimplemented. | ||
// We trap that error here and print a warning. But since the discovery client continues | ||
// building the API object, it is correctly populated with all valid APIs. | ||
// See https://github.com/kubernetes/kubernetes/issues/72051#issuecomment-521157642 |
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.
kubernetes/kubernetes#72051 (comment) for the record.
I'm not entirely sure this fix is accurate. I've looked through the code and what is documented doesn't appear to be the case:
If you look at https://github.com/helm/helm/blob/master/pkg/action/action.go#L171 you see that any error from If you look at https://github.com/kubernetes/client-go/blob/bec269661e48cb1e5fbb0d037f356ffe9e9978a0/discovery/discovery_client.go#L254-L282, where the implementation is, it certainly fits the commented behavior, but since the implementation of |
@kenperkins In our testing, the line that returned the error in question is My intention wasn't to trap all cases of that error, but just the one causing #6361 |
Also, if you can provide a way to reproduce the error you are seeing, or even the error message that you are seeing, that would help us track down the issue. |
can this be cherry-picked into helm 2.x branches? |
This can fix the problem described in #6361, but another problem is it may return wrong capabilities because it fallbacks to use |
Picked into 3.0.2 |
This blocks a particular error (caused by upstream discovery client), printing a warning instead of failing. It's not a great solution, but is a stop-gap until Client-Go gets fixed. Closes helm#6361 Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
Any plans to pick this fix in versions 2.15/2.16? |
See #6361 (comment) |
This blocks a particular error (caused by upstream discovery client),
printing a warning instead of failing. It's not a great solution, but is
a stop-gap until Client-Go gets fixed.
Closes #6361
Signed-off-by: Matt Butcher matt.butcher@microsoft.com