-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Removing internal usage of registerCustomKind #4579
Conversation
@@ -579,7 +585,8 @@ private <T> T handleResponse(HttpRequest.Builder requestBuilder, Class<T> type, | |||
* | |||
* @return Returns a de-serialized object as api server response of provided type. | |||
*/ | |||
protected <T> CompletableFuture<T> handleResponse(HttpClient client, HttpRequest.Builder requestBuilder, Class<T> type, | |||
protected <T> CompletableFuture<T> handleResponse(HttpClient client, HttpRequest.Builder requestBuilder, |
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.
Wouldn't it be easier to provide an overloaded method instead of duplicating the TypeReference inner-class instantiation in most of the calling methods?
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 don't like how many overloaded methods there are already in OperationSupport, so it didn't seem worth it as it would just combine 2 calls.
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.
sounds good
SonarCloud Quality Gate failed. |
Description
This follows up on a next step of #3972 - remove the internal usage of registerCustomKind. The static nature of that registration was problematic both for us and for users as the behavior would seem inconsistent.
This change highlighted that several packages are missing from the KubernetesDeserializer - 8db8124 - that commit won't be needed against master if #4511 is committed first, but may be considered for back-porting.
The strategy here is to use some additional jackson logic to convey an element type with list parsing. list is the only built-in path where we may not have a type already associated with the processing - the other calls, such as a get, will pass the expected type directly; have handling to convert, such as with watch events; or can just use the generic.
Type of change
test, version modification, documentation, etc.)
Checklist